X widget

Alessandro Marozin (marozin@pd.infn.it)
Tue, 14 Jan 1997 14:53:42 +0100

To subscribers of the xforms list from Alessandro Marozin <marozin@pd.infn.it> :

Hallo,
I'm sorry, probably my last mail was not complete becouse of an error.
My question was: "Is it possible to use an X widget inside a xform
application ?".
To enable the widget I tried something like:

XtAppContext appContext;
Widget w, top;

/* Initialize X and Xt */
toplevel = XtAppInitialize(&appContext, name, NULL,
0, NULL, NULL, NULL, NULL, 0);

/* Create my X widget */
w = XtVaCreateManagedWidget("MyWidget", MyWidgetClass, top, ...
NULL);

/* Set widget values */
SetContents(w, ...);


/* Realize the widgets and call XtMainLoop */
XtRealizeWidget(top);
XtAppMainLoop(appContext);


In this case I have a "Segmentation fault" in XtAppInitialize probably
becouse fl_initialize is called before.

How can I solve the problem ?

Thank you for the help

Alessandro Marozin