Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!news From: bon@robotics.jpl.nasa.gov (Bruce Bon) Newsgroups: jpl.motif,comp.windows.x.motif Subject: Problem with WCL/Motif Summary: How do I specify a popupCallback in a WCL resource file? Keywords: WCL, popup Message-ID: <1991Apr10.185914.18123@elroy.jpl.nasa.gov> Date: 10 Apr 91 18:59:14 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Followup-To: jpl.motif Distribution: na Organization: Jet Propulsion Laboratory Lines: 102 Nntp-Posting-Host: saavik.jpl.nasa.gov I have a problem using WCL, probably because I am a beginner at X, etc. Following an example that came with WCL, I have successfully specified something like: 1) *fsb*okCallback: WcPopdownCB(~) where fsb is a file-selection-box widget. I have also done something like: 2) *mywindow.wcCallback: myProcCB( string) where myProcCB was a simple callback procedure that was coded and registered in my version of MRI. BUT when I try to furnish one of my callback procedures to a callback list resource for popups: 3) *manipShell.wcClassName: TransientShell *manipShell.wcChildren: manPop *manPop.wcConstructor: XmCreateText *manipShell.popupCallback: myProcCB nothing happens -- it is as though the popupCallback resource is not recognized at all. One of the reference books that I have says: Because Xt doesn't support a string to Callback resource converter, callbacks cannot be specified in resource files. and I could find no reference to type XtCallbackList except as an internal structure with no type converter available. So how can example (1) possibly work? Is there something in the Intrinsics that parses ~, etc. ? Example 2 shows that I was successful in creating and registering my own callback procedure. So if example 1 does work, why can't I get example 3 to work? Answers or pointers to documentation that I may have overlooked would both be appreciated. Thanks. Bruce Bon bon@robotics.jpl.nasa.gov ACTUAL EXCERPTS AND QUESTION: ------------------------------------------------------- Excerpts from resource files: *operIF.wcPopups: lkbFsbShell, skbFsbShell, lomFsbShell, somFsbShell, \ aysShell, manipShell *lkbFsbShell.fsb*okCallback: WcPopdownCB(~) *manipShell.wcClassName: TransientShell *manipShell.wcChildren: manPop *manipShell.wcCallback: WcTraceCB( manipShell.wcCallback), OifDebugCB(manipShell.wcCallback) *manipShell.popupCallback: WcTraceCB( manipShell.popupCallback) *manPop.wcResFile: operif_manip.wcl ! operif_manip.wcl: operif.wcChildren: manPop *manPop.wcConstructor: XmCreateText *manPop.wcCallback: WcTraceCB( manPop.wcCallback), OifDebugCB(manPop.wcCallback) *manPop.popupCallback: WcTraceCB( manPop.popupCallback) ------------------------------------------------------- Excerpt from file produced by setenv XENVIRONMENT operif.wcl operif >& operif.log where operif is my version of MRI: . . . Wc pop-up: operif.operIF.manipShell of class TransientShell Wc managed: operif.operIF.manipShell.manPop of class XmText . . . Wc managed: operif.operIF.menuBar.manip of class XmCascadeButton . . . TraceCB for operif.operIF.manipShell: manipShell.wcCallback OifDebugCB: manipShell.wcCallback TraceCB for operif.operIF.manipShell.manPop: manPop.wcCallback OifDebugCB: manPop.wcCallback ------------------------------------------------------- callback function OifDebugCB: void OifDebugCB ( w, argString, unused ) Widget w; char* argString; caddr_t unused; { printf( "OifDebugCB: %s\n", argString); } ------------------------------------------------------- Question: I understand that *manPop.popupCallback should have no effect, since the XmText widget class has no such resource. But why, if the *lkbFsbShell.fsb*okCallback works, doesn't the *manipShell.popupCallback work as well?