Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!ai-lab!ai.mit.edu!sundar From: sundar@ai.mit.edu (Sundar Narasimhan) Newsgroups: comp.windows.x Subject: Is this a problem with Saber or XtGetApplicationResources. Keywords: resources, saber Message-ID: <14373@life.ai.mit.edu> Date: 27 Mar 91 02:08:43 GMT Sender: news@ai.mit.edu Reply-To: sundar@ai.mit.edu Followup-To: comp.windows.x Organization: MIT Artificial Intelligence Laboratory Lines: 50 Hi: I'm having a somewhat wierd problem. I have a program that when compiled and executed behaves differently than when it is executed under Saber. (I understand this may be a Saber problem, but I was wondering if any of you have run into it and have a work around). I have a program that does something like: top = XtAppInitialize(NULL, "Graph", optionList, XtNumber(optionList), &argc, argv, NULL, NULL, NULL); XtGetApplicationResources(top, NULL, resources, XtNumber(resources), NULL, 0); where optionList and resources have been initialized thusly: static XtResource resources[] = { { "xlabel", "xlabel", XtRString, sizeof(char *), (unsigned int) &xlabel, XtRString, (caddr_t) "X Values" }, { "ylabel", "ylabel", XtRString, sizeof(char *), (unsigned int) &ylabel, XtRString, (caddr_t) "Y Values" }, { "title", "title", XtRString, sizeof(char *), (unsigned int) &title, XtRString, (caddr_t) "Contour Plot" }, { "infile", "infile", XtRString, sizeof(char *), (unsigned int) &infile, XtRString, (caddr_t) NULL }, { "wire", "wire", XtRBool, sizeof(Bool), (unsigned int) &wireframe, XtRString, (caddr_t) NULL }, { "surface", "surface", XtRBool, sizeof(Bool), (unsigned int) &surface, XtRString, (caddr_t) NULL }, }; static XrmOptionDescRec optionList[] = { { "-xlabel", "*graph*xlabel", XrmoptionSepArg, "X Values" }, { "-ylabel", "*graph*ylabel", XrmoptionSepArg, "Y Values" }, { "-title", "*graph*title", XrmoptionSepArg, "Contour Plot" }, { "-wire", "*wire", XrmoptionNoArg, (caddr_t) "True" }, { "-surface", "*surface", XrmoptionNoArg, (caddr_t) "True" }, { "-in", "*infile", XrmoptionSepArg, (caddr_t) NULL }, }; Now, the program compiles and executes fine. But I'd like to run this under Saber. Unfortunately, when I try to do this, XtGetApplicationResources doesn't seem to notice the passed in argc, argv when I do this. How is this really supposed to work? It looks like XtAppInitialize saves away the arguments and sets argc to 1, and then XtGetApplicationR.. gets the data from the saved area. Why does this work in my executable but not under Saber? Thanks for any help you can provide in advance. (BTW, I've tried reinitializing the variables within Saber, re-running etc.. but nothing seems to work).