Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!biar!trebor From: trebor@biar.UUCP (Robert J Woodhead) Newsgroups: comp.sys.mac.programmer Subject: Re: WaitNextEvent problem Keywords: WaitNextEvent MultiFinder SystemTask Message-ID: <520@biar.UUCP> Date: 2 May 89 13:17:27 GMT References: <2864@crete.cs.glasgow.ac.uk> Reply-To: trebor@biar.UUCP (Robert J Woodhead) Organization: Biar Games, Inc. Lines: 23 In article <2864@crete.cs.glasgow.ac.uk> dunlop@cs.glasgow.ac.uk (Mark Dunlop) writes: > [Mark is having problems with WaitNextEvent] > The call was -> WaitNextEvent(EveryEvent,TheEvent,-1,nil); Mark, Did you remember to tell the system that the application was multifinder friendly, etc, etc, by setting the appropriate bits in the SIZE -1 resource. See IM and the tech notes for details on being multifinder friendly. In particular, if you want to chunk around in the background, you should be accepting NULL events, and when you get one you should be calling SystemTask. (In general, anytime you get an event, you should be calling SystemTask). In my programs, if I combine the proper SIZE -1 bits (notably jugglerAware [hehe, shows how old the program is] and canBackground) with a program that calls SystemTask each time it gets events, you have no problems. -- Robert J Woodhead, Biar Games, Inc. ...!uunet!biar!trebor | trebor@biar.UUCP "The NY Times is read by the people who run the country. The Washington Post is read by the people who think they run the country. The National Enquirer is read by the people who think Elvis is alive and running the country..."