Path: utzoo!attcan!uunet!mcvax!uvabick!thomas From: thomas@uvabick.UUCP (Thomas Fruin) Newsgroups: comp.sys.mac.programmer Subject: Re: MultiFinder and Dialog boxes (was Re: MultiFinder switch bug with custom WDEFs) Message-ID: <252@uvabick.UUCP> Date: 16 May 88 17:57:35 GMT References: <242@uvabick.UUCP> <8700@apple.Apple.Com> <2887@midas.TEK.COM> <9448@apple.Apple.Com> Organization: uvabick Lines: 26 Ed Tecot writes: > One thing Phil did forget to mention is that since modal dialogs have > their own event loop, there is no way to get the suspend and resume > events to the application. That's why I hate modal dialogs! I try to avoid them as much as possible, a and when I _do_ have to use them, I don't call ModalDialog at all. Instead, 1) I put up the window with (Get)NewDialog 2) I disable the whole menu bar except the Edit menu 3) I set a global flag that tells the application a dialog is in front 4) and I simply keep calling the main event loop, which has code to handle modeless dialogs, as illustrated earlier. The advantages? The user gets to use the Edit menu ( a real bonus ), and you can keep using the main event loop (so all the correct events, such as suspend, resume and activate, get passed to the application). -- Thomas Fruin fruin@hlerul5.BITNET University of Leiden thomas@uvabick.UUCP University of Amsterdam hol0066.AppleLink 2:512/114.FidoNet The Netherlands