[comp.sys.hp] HP List widget callback. How?

irf@kuling.UUCP (Bo Thide') (09/17/89)

On the HP-UX man page XWLIST(3X) I can read:
 
 "..  The application must take over the widget's select callback in
  order to be notified that the item has been selected."

But it doesn't seem to say explicitelty how this takeover can be accomplished.
An ordinary XtAddCallback(.., XtNselect,..,..) for the list widget itself will
result in "X Toolkit Warning: Cannot find callback list in XtAddCallbacks".
If instead I add the callback to the individual widgets in the list (in
my case static text widgets) nothing happens after a normal (Button1) select.

I am sure this is trivial but I am stuck.  Any help to bt@irfu.se or
here would be appreciated.

-Bo

   ^   Bo Thide'--------------------------------------------------------------
  | |       Swedish Institute of Space Physics, S-755 91 Uppsala, Sweden
  |I|    [In Swedish: Institutet f|r RymdFysik, Uppsalaavdelningen (IRFU)]
  |R|  Phone: (+46) 18-403000.  Telex: 76036 (IRFUPP S).  Fax: (+46) 18-403100 
 /|F|\        INTERNET: bt@irfu.se       UUCP: ...!uunet!sunic!irfu!bt
 ~~U~~ -----------------------------------------------------------------sm5dfw


irf@kuling.UUCP (Bo Thide') (09/17/89)

In article <1172@kuling.UUCP> irf@kuling.UUCP (Bo Thide') writes:
> [text deleted]
>An ordinary XtAddCallback(.., XtNselect,..,..) for the list widget itself will
>result in "X Toolkit Warning: Cannot find callback list in XtAddCallbacks".
>If instead I add the callback to the individual widgets in the list (in
>my case static text widgets) nothing happens after a normal (Button1) select.
>

Adding callbacks to individual list items is the correct way of doing it.
I just found that out (after removing a nasty little bug -- shame on me).
Sorry that I wasted net bandwidth with this one.  On the other hand, I
am sure I wouldn't have solved the problem without asking for help on the net 
:-)  Sometimes you get very blind.

-Bo