Thread View: jpl.motif
1 messages
1 total messages
Started by Bruce Bon
Wed, 10 Apr 1991 18:59
Problem with WCL/Motif
Author: Bruce Bon
Date: Wed, 10 Apr 1991 18:59
Date: Wed, 10 Apr 1991 18:59
102 lines
3967 bytes
3967 bytes
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?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads