Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!srg!lyons From: lyons@srg (Don R. Lyons x4811) Newsgroups: comp.windows.x.motif Subject: Re: XmNdestroryCallback on a SelectionBoxDialog... Message-ID: Date: 29 May 91 18:09:30 GMT References: <1991May29.024641.21512@ux1.cso.uiuc.edu> Sender: news@srg.uucp (News Administrator) Reply-To: lyons%srg@uunet.uu.net Distribution: local,world,all Organization: Software Reuseabilty Group Lines: 26 In-Reply-To: CWIKLA@uimrl7.mrl.uiuc.edu's message of 29 May 91 03:38:36 GMT In article <1991May29.024641.21512@ux1.cso.uiuc.edu> CWIKLA@uimrl7.mrl.uiuc.edu (John/Consultant) writes: > I am trying to use XtDestroyWidget inside the cancel button > callback (I actually try to destroy the DialogShell parent > of the callback widget...) > > However this does not work -- program crashes... In Motif 1.0.* for X11R3 this behavior is, unfortunately, correct. The bug with calling XtDestroyWidget has been fixed in Motif 1.1.* for X11R4, so the release notes claim. I am still waiting for source so can someone verify? Anyways, the work around we did for Motif 1.0.* for X11R3 is to add the widget to a list of widgets to be destroyed in the callback and did a XtAddWorkProc to register a one-shot function that calls XtDestroyWidget on the widgets in the list. Of course, the function registered with XtAddWorkProc will be called when you return to the event loop. -- Don R Lyons Any opinions expressed are my own. Arinc Research Inc uucp : uunet!srg!lyons SRG, Mail Stop 5230 voice: 301 266 4811 2551 Riva Road Annapolis , MD 21401 fax : 301 266 2047