goins@elaine16.Stanford.EDU (daryl goins) (04/17/91)
I am trying to write some graphics in a XwworkSpaceWidget but I am getting
a window error. Specifically, I have the following code
void main(argc, argv)
int argc;
char **argv;
{
Widget topLevel, framework, mainWindow;
XtAppContext app_con;
topLevel = XtAppInitialize(&app_con, "Xlist", NULL, ZERO,(Cardinal *)
&argc, argv, resources, NULL, ZERO);
framework = XtCreateManagedWidget("framework", XwformWidgetClass, topLevel,
NULL, ZERO);
mainWindow = XtCreateManagedWidget("mainWindow",XwworkSpaceWidgetClass,
framework, NULL, ZERO);
printf("main %d, toplevel, %d framework %d\n",XtWindow(mainWindow),
XtWindow(topLevel), XtWindow(framework));
XtRealizeWidget(topLevel);
XtAppMainLoop(app_con);
}
when I print out the window values I get:
main 0 toplevel 0 framework 0
Obviously I'm doing something wrong, if anyone knows, I would
really really appreciate any advice. If you have a piece of code
I would be even more thankful.
Daryl M. Goins
--
Daryl M. Goins
goins@cs.stanford.edu
"I said that but
I didn't know what I was talking about??" - Money Jones
bschoen@well.sf.ca.us (Brook Schoenfield) (04/21/91)
goins@elaine16.Stanford.EDU (daryl goins) writes: >I am trying to write some graphics in a XwworkSpaceWidget but I am getting >a window error. > printf("main %d, toplevel, %d framework %d\n",XtWindow(mainWindow), > XtWindow(topLevel), XtWindow(framework)); > XtRealizeWidget(topLevel); there is no window reference before a window is mapped (the realize call). Good luck -- Brook Schoenfield bschoen@well.sf.ca.us "How can our technology be used to create a peaceful, well fed world?" - burning question