Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!asuvax!ncar!boulder!grunwald From: grunwald@foobar.colorado.edu (Dirk Grunwald) Newsgroups: comp.windows.x Subject: better interface to XtCallActionProc Message-ID: <15691@boulder.Colorado.EDU> Date: 16 Jan 90 20:09:50 GMT Sender: news@boulder.Colorado.EDU Reply-To: grunwald@foobar.colorado.edu Distribution: comp Organization: University of Colorado at Boulder Lines: 42 Is there a better interface to XtCallActionProc, perhaps something that parses the parameters as the translation manager would? I've got a little menu package (EzMenu) that subclasses SimpleMenu and smeBSBObject to call user-specified action procedures on a notify event. the action procedures are specified as part of the EzMenu ``menu'' resource, e.g. *EzMenu*Menu:\ (item "quit"\ (label "This is Item One")\ (action "quit()"))\ (line)\ (item "item2" \ (label "This is Item 66")\ (action "hi-mom(foo)"))\ (item "item3" \ (label "This is Item Three")\ (action "hi-mom(bar)"))\ (item "item4" \ (action "hi-mom(baz)")\ (label "This is Item 99")) builds a menu of items with widget names "quit", "item2", .. etc and the respective labels. The items are of class ezmeObjectClass The intent is to call the ``action'' routine; the problem is that XtCallActionProc wants the arguments parsed into parameters. E.g, foo(bar baz) would call action proc ``foo'' with parameters bar & baz if specified in a translation table, but it appears that I have to parse this myself. If this is the case, I'm gonna revert to an infinitly easier (& cheesier) specification of the action procedures: to wit, let TMparse do it by specifying them as resources to the widgets of the appropriate name.