Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!snorkelwacker!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!chx400!ethz!neptune!iiic.ethz.ch!mneerach From: mneerach@iiic.ethz.ch (Matthias Ulrich Neeracher) Newsgroups: comp.sys.mac.programmer Subject: Re: Getting Events in GetNextEvent patch Message-ID: <14605@neptune.inf.ethz.ch> Date: 13 Nov 90 11:36:21 GMT References: <998@h.cs.wvu.wvnet.edu> Sender: news@neptune.inf.ethz.ch Reply-To: mneerach@iiic.ethz.ch (Matthias Ulrich Neeracher) Organization: Departement Informatik, ETH, Zurich Lines: 29 In article <998@h.cs.wvu.wvnet.edu> robinson@cs.wvu.wvnet.edu (John Robinson) writes: >I am working on an init that pops up a dialog window when you hit a >user-definable key sequence. I accomplish this by patching GetNextEvent >and looking for the appropiate event in the Event Queue. If it is there, >I pop-up my window. How should I go about getting subsquent events for >my dialog should I manually look throught the event queue for mouse-down >events and the like. Why do you search the Event Queue for your event in the first place. IMHO, it is better to - patch SystemEvent - wait for it to be called with your Hot Key - Do The Right Thing - return from SystemEvent indication the Hot Key had been handled. During your popup dialog, you just can call GetNextEvent. >Do I also need to patch WaitNextEvent or does it call GetNextEvent? I think it currently does. I'd like to know myself, though, how long things will stay that way. Matthias ----- Matthias Neeracher mneerach@iiic.ethz.ch "These days, though, you have to be pretty technical before you can even aspire to crudeness." -- William Gibson, _Johnny Mnemonic_