Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!mips!apple!greggor From: greggor@Apple.COM (Greg L. Anderson) Newsgroups: comp.sys.mac.programmer Subject: GetNextEvent at beginning of App (was: Application startup window Q) Message-ID: <53745@apple.Apple.COM> Date: 7 Jun 91 17:47:46 GMT References: <1991Jun3.182417.2897@basho.uucp> <25235@well.sf.ca.us> Organization: Apple Computer Inc., Cupertino, CA Lines: 23 In article <25235@well.sf.ca.us> smoke@well.sf.ca.us (Nicholas Jackiw) writes: >If you're running under Multifinder on 6.x systems (or even if you're not), >the 10 calls to GetNextEvent() make sure that your window and process >are brought frontmost--an intermittent problem. Be careful about doing this on System 7; if your App just blindly calls GetNextEvent(everyevent) a few times when it starts up, you'll lose all of your open document high-level events if your app is AppleEvent aware. If you do call GetNextEvent, at the very least you should use the mask everyevent - kHighLevelEvent even if your app isn't AppleEvent aware. If you don't, someday you might convert to AppleEvent aware and forget about those pesky GetNextEvents at the beginning of your App. GetNextEvent( 0, &event ) might be an even better idea if it circumvents the MF problem in 6.0.x; I haven't looked into it. I believe that it's not necessary at all under System 7. -- ----------------- ---------------------- Greg Anderson User Programming Group () "Ponnuki greggor@apple.com Apple Computer, Inc. () () is ideal ----------------- ---------------------- () shape."