Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!infonode!doyle From: doyle@infonode.ingr.com (Doyle Davidson) Newsgroups: comp.windows.x.motif Subject: UIL and widgets in callbacks Message-ID: <1991Apr24.192305.22011@infonode.ingr.com> Date: 24 Apr 91 19:23:05 GMT Organization: Intergraph Corp. Huntsville, AL Lines: 40 Can someone give me a working example of how to pass a widget as the user data to a callback function from UIL. My attempts lead to the following error: Widget resource invalid as callback tag value This is part of what I do: procedure PrintMyName(any); ... callbacks { XmNactivateCallback = procedure PrintMyName(XmPushButton mypb); }; where mypb is an XmPushButton object. On a related note, I have seen code where callbacks are defined as: XtCallbackProc mycB(...) { ... } and this does not seem correct since XtCallbackProc is a pointer to a function that returns void. My ANSI compiler doesn't like it either. Shouldn't callbacks simply be defined as: void myCB(...) { ... } Doyle ------------------------------------------------------------------- Doyle C. Davidson | Intergraph Corp. | Intergraph - Everywhere you look!! Third Party Software | 1 Madison Industrial Park | Huntsville, AL 35806 | These comments are... (205) 730-2000 | | X-clusively my own. ..!uunet!ingr!doyle | - or - doyle@ingr.com | -------------------------------------------------------------------