Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!lll-lcc!well!wdh From: wdh@well.UUCP (Bill Hofmann) Newsgroups: comp.sys.mac.programmer Subject: Re: MultiFinder Weirdness Summary: read TN180 Message-ID: <7279@well.UUCP> Date: 3 Oct 88 21:22:44 GMT References: <1420@ndsuvax.UUCP> Reply-To: wdh@well.UUCP (Bill Hofmann) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 22 In article rj0z+@andrew.cmu.edu (Robert George Johnston, Jr.) writes: > > I have written a program that I would like to make compatable >with MultiFinder. Actually, the program runs just fine, but when the >application is first launched, the application window opens underneath >all other open windows (such as the Finder's). > What does one have to do to get around this? Or, what have I done >wrong? Multifinder maintains the windows for an application in a "layer", which allows it to isolate them from other windows. TN180 p.10 describes the problem you (and others, myself included) have run into, which implies that the layer for a launched application isn't brought to the front until WaitNextEvent or GetNextEvent or EventAvail is called a few times. The solution is painless but annoying: before bringing up a window at the start (say, a dialog or alert, or a window representing a doc double clicked by the user), call one of these routines a few times (I call WaitNextEvent 4 times). -Bill Hofmann