Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!newstop!sun!eureka!argv From: argv%eureka@Sun.COM (Dan Heller) Newsgroups: comp.windows.x Subject: Re: Command Widgets Message-ID: <113961@sun.Eng.Sun.COM> Date: 6 Jul 89 17:19:08 GMT References: <8907061449.AA25756@ogrilla.mcs.anl.gov> Sender: news@sun.Eng.Sun.COM Reply-To: island!argv@sun.com (Dan Heller) Lines: 20 In article fineberg@ANTARES.MCS.ANL.GOV writes: > How do I tell which button has been pressed within the callback routine of > a command widget. Also, is it possible to call different routines depending > on which button has been pressed. You can't. However, since the call_data of the callback routine is NULL, one would think (nudge nudge) that the implementors of the command widget would pass something -useful- (wink wink) in its place.... like a pointer to (or a copy of) the event struct which initiated it.. This is a hint to widget-writers. If you're going to call XtCallCallbacks from inside your widget, please take care to pass useful information in the call_data parameter. NULL is not useful. If nothing else, pass the event structure since the callback function has no idea what happened to cause the callback to be called. dan ----- My postings reflect my opinion only -- I represent no company's opinions.