richard@ben.Jpl.Nasa.Gov (Conan the Barbarian) (04/13/90)
I thought I would try sending this to someone at Sun. They suggested a bug report. Since I still am waiting for some answer to another bug reported 18 months ago, I thought I would just send out a flame instead. The XView Programming Manual by Dan Heller, O'Reilly and Associates has an error. (How in the Hell a Sun bug report would help that is beyond me.) Section 7.9.4 List Notification on page 157 is erroneous by omission. The list_notify_proc returns one of PANEL_LIST_OP_DESELECT,PANEL_LIST_OP_SELECT, PANEL_LIST_OP_VALIDATE,PANEL_LIST_OP_DELETE. Heller states that it returns either SELECT or DESELECT. The later two ops are in response to a panel_list menu notify. They require a response. Therefore, the type of the list_notify_proc should reflect the return type. As for XVIEW 1.0.1, I found one interesting bit of stupidity. There are others but they can have their own post. (I said this was a flame.) Instead of returning the Panel_item handle to the panel_list in the notify_proc XView returns the handle to an internal message item from which you can grab the panel_list_string. However, in section 7.9.2 XView requires the row number to do anything like delete,insert, or load a string. There is no direct access to the row number corresponding to the selected entry. XView does an exhaustive search comparing the message handle to the message handles in the internal list. Publicly the PANEL_LIST_SELECTED attribute is suggested to perform your own exhaustive search. As a side-effect of losing the Panel_item handle to the panel_list in the notify_proc, an XV_KEY_DATA attached data item is inaccessible. I'm still searching for a way to dig the damn thing back out. As an addendum, you may replace the practically useless panel_list menu using the PANEL_ITEM_MENU attribute. That is not documented but it is in the XView 1.0.1 source available throught the MIT X11R4 release. All of this may be so much manure with the release of XView 2.0. "It will be [fixed,there,absent] in the next release due out in late summer." - Sub-human Uni-sex Nutworks