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

  1. Path: sparky!uunet!charon.amdahl.com!amdahl!amdcad!dvorak.amd.com!usenet
  2. From: rpomeroy@aunext3.amd.com (Ron Pomeroy x(Coop))
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: NeXT Event Loop Question
  5. Message-ID: <1992Nov23.235956.22129@dvorak.amd.com>
  6. Date: 23 Nov 92 23:59:56 GMT
  7. References: <1992Nov20.182445.9500@jarvis.csri.toronto.edu>
  8. Sender: usenet@dvorak.amd.com (Usenet News)
  9. Reply-To: rpomeroy@aunext3.amd.com
  10. Distribution: usa
  11. Organization: Advanced Micro Devices, Inc.; Austin, Texas
  12. Lines: 46
  13.  
  14. In article <1992Nov20.182445.9500@jarvis.csri.toronto.edu>  
  15. west@turing.toronto.edu (Tom West) writes:
  16. >>  A more general implementation question from a tyro NeXT programmer.
  17. >>
  18. >>  I am porting over an interpreter to the NeXT.  When execution is
  19. >>called for, the program calls the execution module.  It displays
  20. >>output to its output window and occasionally asks for input from
  21. >>the same window.  Or at least, it should.  
  22. >>
  23. >>  I am at a loss as to how I am supposed to:
  24. >>    (1) Have the rest of the system keep responding
  25. >>    (2) Have the execution wait for key input.
  26. >>
  27. >>  Rather kindly, the execution process does come up for air fairly regularly.
  28. >>Looks like:     do
  29. >>            {
  30. >>            running = Execute ();
  31. >>        } while (running != FINISHED)
  32. >>
  33. >>  On other systems, I just insert a call to the main event loop in the
  34. >>do loop and the application is able (with a little help) to process
  35. >>events.  Is there any equivalent to this on the NeXT?
  36. >>
  37. >>  Is creating a MACH thread my only alternative?  That's going to require
  38. >>much more programming overhead than I would like (to say nothing of the
  39. >>fact that I would have to learn all about threads in about 2 days :-)).  
  40. >>Is there a simple method of doing all of this that I've missed?
  41. >>
  42. >>  Many thanks in advance.
  43. >>-- 
  44. >>
  45. >>    Tom West        
  46. >>
  47. >>   west@turing.toronto.edu  or            "Children of the Blood"
  48. >>tomwest@gpu.utcs.utoronto.ca  or          -Michelle Sagara
  49. >>       west@hsa.on.ca
  50.  
  51. Just a shot in the dark but...What about using the Subprocess class ? (see 
  52. /NeXTDeveloper/Examples/Unix/Subprocess)  I used it to talk to a Mathematica  
  53. kernel via an external C program (supplied with Mma).  Super easy to use.
  54.  
  55. --
  56. Ronald Pomeroy        [Objective-Cruntime: [Smalltalk runtime]];
  57. Advanced Micro Devices    [self dream-on];
  58. CAM Applications Group
  59. rpomeroy@aunext1.amd.com (NeXTmail preferred)
  60.