Newsgroups: comp.windows.x.motif Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!wolf.cs.washington.edu!slh From: slh@wolf.cs.washington.edu (Scott Heyano) Subject: Re: XtCallCallbacks Message-ID: <1991Apr3.100219.27421@beaver.cs.washington.edu> Sender: news@beaver.cs.washington.edu (USENET News System) Reply-To: slh@wolf.cs.washington.edu (Scott Heyano) Organization: Computer Science & Engineering, U. of Washington, Seattle References: Date: Wed, 3 Apr 91 10:02:19 GMT In article nana@opal.bellcore.com (Ana M. Swanson) writes: [stuff] |CODE in a procedure: | |XmListCallbackStruct tmp_lcs; | |tmp.item = XmStringLtoRCreate(widget1, XmSTRING_DEFAULT_CHARSET); |XtCallCallbacks(XmSelectionBoxGetChild (widget2, XmDIALOG_APPLY_BUTTON), | XmNbrowseSelectionCallback, | &tmp); First your code (example) isn't consistant, you have tmp_lcs declared and not used and then reference tmp & widget2 which are not declared. I think here (assuming widget2 is an XmSelectionBox) the callback is associated with the XmSelectionBox or XmList and not the apply button. | | | |CODE in main program: | |XtAddCallback(XmSelectionBoxGetChild(widget3, XmDIALOG_LIST), | XmNbrowseSelectionCallback, (XtCallbackProc) widget4, NULL); Again it looks like you have real code problems, is widget3 suppose to be the same as widget2 above? is widget4 really suppose to be a function? Your adding the callback to the XmList child (which may or may not be necessary, you may be able to use the XmSelectionBox directly, I don't have the docs right here to check...) In any case your addding it to the XmList and trying to invoke it on the apply button above.