Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!quanta.eng.ohio-state.edu!kcgl1.eng.ohio-state.edu!DAVISM From: DAVISM@kcgl1.eng.ohio-state.edu (Michael T. Davis) Newsgroups: comp.windows.x Subject: Problem with Dwt List Box (callback data) Message-ID: <3035@quanta.eng.ohio-state.edu> Date: 14 Sep 89 19:28:53 GMT Sender: news@quanta.eng.ohio-state.edu Organization: Ohio State University Lines: 50 I am experiencing a problrm with the callback data structure passed to my callback function for a DECwindows Toolkit (Dwt) List Box widget. I am running DECwindows under VMS 5.1-B on a VAXstation 3100. Here's the List Box set up code: list_box = DwtListBox ( main_window, "Verb List", 18, 38, NULL, 0, 4, NULL, NULL, True, False ); XtAddCallback ( list_box, DwtNsingleCallback, list_callback, NULL ); XtSetArg ( settings [ 0 ], DwtNsingleSelection, True ); XtSetValues ( list_box, settings, 1 ); And here's the callback: void list_callback ( widget, user_data, callback_data ) Widget * widget; caddr_t user_data; DwtListBoxCallbackStruct callback_data; { #ifdef DEBUG printf ( "Item number = %d\nItem Length = %d\n", callback_data. item_number, callback_data. item_length ); #endif if ( callback_data. reason != DwtCRSingle ) return; else { DwtListBoxSelectItem ( widget, callback_data. item, False ); parse_verb ( & callback_data. item_number ); } } The reason member and item_length of the callback data structure always have bogus values in them and the item_number member is always 0. All the structure members stay constant, no matter which item I select with the pointer. Is there something really obvious I am forgetting, or what? Thanks, Mike ________________________________________________________________________ | InterNet> davism@{kcgl1.eng|rcgl1.eng|osu-20.ircc}.ohio-state.edu | | -or- | | davis-m@eng.ohio-state.edu | | CompuServe> 73667,541 | |************************************************************************| | These thoughts, they be mine | ------------------------------------------------------------------------