🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1354

Re: [NXApp run]

#1354
From: Michael Gersten
Date: Thu, 08 Oct 1992 02:47
32 lines
1919 bytes
In article <1992Sep1.002728.15172@fcom.cc.utah.edu> burchard@horizon.math.utah.edu (Paul Burchard) writes:
>> In article <1992Aug25.092051@fdr.jsc.nasa.gov> shirley@fdr.jsc.nasa.gov (Bill  
>> Shirley [CSC]) writes:
>> > 
>> > Does the -run method of Application NEED to be invoked.
>> > I need a little bit more control over the event loop.
>
>There really should be a way to "flush" NXApp, dispatching all pending events  
>and performing any other NXApp chores, and then returning.  I do not know of  
>any way to kludge this with the current API (the modal loop methods almost fit  
>the bill but they all discard some events).
>
>I would suggest NeXT add the following method to NXApp to achieve this:
>
>	- flushEvents:(int)mask waitFor:(double)timeout threshold:(int)level
>
>with parameters analogous to -getNextEvent:waitFor:threshold:.  Anyone at NeXT  
>listening?

Can't you do this by putting a stop message in the queue and then calling
[NXApp run]? The run will return if a 'stop' is seen, but can you call
run from within run (I.e., is it re-entrant), or do you have to re-write the
main() routine?

I agree that 'flushEvents' would be a cleaner way, but cleaner yet would
be '[NXApp flushEvents]'.

		Michael
-- 
		Michael Gersten		michael@stb.info.com
HELLO! I'm a signature virus! Join in the fun and copy me into yours!
ex:.-1,. w $HOME/.signature
Technical Details
Message-ID: <1992Oct8.024745.21528@stb.info.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!know!cass.ma02.bull.com!think.com!yale.edu!jvnc.net!darwin.sura.net!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!ucla-cs!netcon!xenon!denwa!stb!michael
References: <1992Aug31.143034.12176@visus.com> <1992Sep1.002728.15172@fcom.cc.utah.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!know!cass.ma02.bull.com!think.com!yale.edu!jvnc.net!darwin.sura.net!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!ucla-cs!netcon!xenon!denwa!stb!michael
From: michael@stb.info.com (Michael Gersten)
Newsgroups: comp.sys.next.programmer
Subject: Re: [NXApp run]
Message-ID: <1992Oct8.024745.21528@stb.info.com>
Date: 8 Oct 92 02:47:45 GMT
References: <1992Aug31.143034.12176@visus.com> <1992Sep1.002728.15172@fcom.cc.utah.edu>
Organization: STB BBS, La, Ca, 310 397 3137
Lines: 32