As a general note of interest, according to Apple's HIG (I suppose), when are we supposed to use "Sheets" rather than conventional Dialogs? I, frankly, don't really care much for them - otherwise! Joe Wilkins Robert Covington wrote: > > On Wednesday, March 3, 2004, at 04:58 PM, Edwards, Waverly wrote: > >> >> Herbie, >> >> I dont understand why (as a part of your handler) you dont hide, then >> close >> the sheet, followed by the closing of the parent if need be. >> >> W. >> > > I do that and seems to work fine. I have a "Close All" button which > hides , then closes the sheet window and also the dialog from which it > sprung. I've no report of crashes from anyone. > > In response to Close all button.. > > get window _MediaBrushHelpSheetWnd, sheetW > osStatus = fn HideSheetWindow( sheetW ) > FN closeMediaOptionsWnd // takes care of the big'un too > > The latter FN is composed of basically... > Window Close _MediaShadowSheetWnd > Window Close _MediaOptionsWnd > > (No carbon events used in my case) > > rc > >> >> -----Original Message----- >> From: H. Gluender [mailto:h@...] >> Sent: Wednesday, March 03, 2004 4:11 PM >> To: FB Mailing List >> Subject: [FB] New kind of crashes with OSX ? >> >> >> Dear friends of sheet windows, >> >> it took me quite some time to figure out the reason of a quite >> annoying kind of crashes that occurs sometimes after a sheet window >> closes _together_ with its parent window. (The latter being >> essential!) >> >> Here is an explanation and a remedy: >> >> Closing the sheet _after_ its parent window may lead to a crash. >> >> Because events in the sheet are handled asynchronously, it may happen >> -- in cases where the clicked OK button not only closes the sheet but >> the parent window as well, that the latter closes before the sheet. >> >> Consequently, one must only close the parent window after it has >> received the kHICommandOK event that is sent after the sheet is >> closed. >> >> The remedy requires you to install a "kHICommandOK"-event handler for >> the parent window... >> >> A simpler and more conventional solution is to close the "parent" >> window first and then to tell the user why this had to happen, e.g. >> by a conventional alert. >> >> Hope this is of some worth. >> >> Best >> -- >> >> >> Herbie >> >> ------------------------ >> >> <http://www.gluender.de> >> >> -- >> >> -- >> > > -- > >