Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU (Donna Converse) Newsgroups: comp.windows.x Subject: Re: Problem in XtNameToWidget Message-ID: <9005301627.AA26071@expo.lcs.mit.edu> Date: 30 May 90 16:27:28 GMT References: <8181@jpl-devvax.JPL.NASA.GOV> Sender: daemon@athena.mit.edu (Mr Background) Organization: X Consortium, MIT Laboratory for Computer Science Lines: 24 > First of all, the very definition of XtNameToWidget seems > sorta bizarre. It requires a name starting *below* the > reference widget, not *from* the reference widget. If it started at the reference widget in trying to match the name, and the reference widget matched, it would simply return its first argument. That functionality isn't useful, so it starts with the children of the reference widget. > Nevertheless, it has the following bug: it always checks > the children of a widget, and this does not work when the > children are *Gadgets*... It will seg fault if you give it a non-widget argument in the first parameter. The spec stipulates that it will take a non-widget argument, so this is a bug in the code. Since Objects can not and will not ever have children, XtNameToWidget should return NULL if passed a non-widget argument as the reference widget. Test that it is not a widget, rather than using XmIsGadget. Thanks for bringing this up. I filed a bug report. Donna Converse converse@expo.lcs.mit.edu