🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

NeXT Event Loop Question

#1856
From: Tom West
Date: Fri, 20 Nov 1992 23:24
34 lines
1620 bytes
  A more general implementation question from a tyro NeXT programmer.

  I am porting over an interpreter to the NeXT.  When execution is
called for, the program calls the execution module.  It displays
output to its output window and occasionally asks for input from
the same window.  Or at least, it should.  

  I am at a loss as to how I am supposed to:
	(1) Have the rest of the system keep responding
	(2) Have the execution wait for key input.

  Rather kindly, the execution process does come up for air fairly regularly.
Looks like: 	do
	        {
		    running = Execute ();
		} while (running != FINISHED)

  On other systems, I just insert a call to the main event loop in the
do loop and the application is able (with a little help) to process
events.  Is there any equivalent to this on the NeXT?

  Is creating a MACH thread my only alternative?  That's going to require
much more programming overhead than I would like (to say nothing of the
fact that I would have to learn all about threads in about 2 days :-)).  
Is there a simple method of doing all of this that I've missed?

  Many thanks in advance.
-- 

	Tom West		

   west@turing.toronto.edu  or			"Children of the Blood"
tomwest@gpu.utcs.utoronto.ca  or		  -Michelle Sagara
       west@hsa.on.ca
Technical Details
Message-ID: <1992Nov20.182445.9500@jarvis.csri.toronto.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!turing.toronto.edu!west

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!turing.toronto.edu!west
Newsgroups: comp.sys.next.programmer
From: west@turing.toronto.edu (Tom West)
Subject: NeXT Event Loop Question
Message-ID: <1992Nov20.182445.9500@jarvis.csri.toronto.edu>
Organization: CSRI, University of Toronto
Date: 20 Nov 92 23:24:45 GMT
Lines: 34