Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!fuug!funic!santra!hila.hut.fi!jmunkki From: jmunkki@hila.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.programmer Subject: Re: Allowing tasking (Was: An itsy bitsy question...) Message-ID: <1991Jan10.101015.4136@santra.uucp> Date: 10 Jan 91 10:10:15 GMT References: <27725.2787e3d0@kuhub.cc.ukans.edu> <1991Jan8.043323.954@santra.uucp> <127611@linus.mitre.org> <1991Jan9.150954.28230@santra.uucp> <9843@ncar.ucar.edu> Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: jmunkki@hila.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, FINLAND Lines: 30 In article <9843@ncar.ucar.edu> hpoppe@ncar.ucar.edu (Herb Poppe) writes: >Does TrackControl give up time to background tasks? Oops. Forgot about that one. I guess one could use action procs, but usually users only click on controls (except scroll bars, where you certainly have the chance of installing your own actions). The dialog manager is supposed to be out anyway, although I still use it quite a lot. >Similarly, how might one "unroll" all the operations of TrackControl into >one's event loop so that one can handle other "events" while the user is >holding down the button over a control. In my application, I need to be >able to handle "commands" arriving via the serial port while the mouse >user is holding down the mouse button for as long as a minute. In your case, you could use completion routines for the serial port drivers, or you could use action procs with calls to GetNextEvent with a mask that allows only your own events. BTW: I think that if you call GetNextEvent with a 0 event mask, it will just allow background tasks to run and return. This might be a nice thing to insert into long calculations. SystemTask probably should do the same thing, but I seem to remember that it doesn't. I'm not in the mood to verify all this by programming, so take all this advice with some doubt and find out yourself what works and what doesn't. ____________________________________________________________________________ / Juri Munkki / Helsinki University of Technology / Wind / Project / / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / STORM / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~