home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / programm / 7337 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  1.5 KB

  1. Path: sparky!uunet!utcsri!turing.toronto.edu!west
  2. Newsgroups: comp.sys.next.programmer
  3. From: west@turing.toronto.edu (Tom West)
  4. Subject: NeXT Event Loop Question
  5. Message-ID: <1992Nov20.182445.9500@jarvis.csri.toronto.edu>
  6. Organization: CSRI, University of Toronto
  7. Date: 20 Nov 92 23:24:45 GMT
  8. Lines: 34
  9.  
  10.   A more general implementation question from a tyro NeXT programmer.
  11.  
  12.   I am porting over an interpreter to the NeXT.  When execution is
  13. called for, the program calls the execution module.  It displays
  14. output to its output window and occasionally asks for input from
  15. the same window.  Or at least, it should.  
  16.  
  17.   I am at a loss as to how I am supposed to:
  18.     (1) Have the rest of the system keep responding
  19.     (2) Have the execution wait for key input.
  20.  
  21.   Rather kindly, the execution process does come up for air fairly regularly.
  22. Looks like:     do
  23.             {
  24.             running = Execute ();
  25.         } while (running != FINISHED)
  26.  
  27.   On other systems, I just insert a call to the main event loop in the
  28. do loop and the application is able (with a little help) to process
  29. events.  Is there any equivalent to this on the NeXT?
  30.  
  31.   Is creating a MACH thread my only alternative?  That's going to require
  32. much more programming overhead than I would like (to say nothing of the
  33. fact that I would have to learn all about threads in about 2 days :-)).  
  34. Is there a simple method of doing all of this that I've missed?
  35.  
  36.   Many thanks in advance.
  37. -- 
  38.  
  39.     Tom West        
  40.  
  41.    west@turing.toronto.edu  or            "Children of the Blood"
  42. tomwest@gpu.utcs.utoronto.ca  or          -Michelle Sagara
  43.        west@hsa.on.ca
  44.