home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5901 < prev    next >
Encoding:
Text File  |  1992-08-31  |  2.0 KB  |  45 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!hellgate.utah.edu!fcom.cc.utah.edu!news
  3. From: burchard@horizon.math.utah.edu (Paul Burchard)
  4. Subject: Re: [NXApp run]
  5. Message-ID: <1992Sep1.002728.15172@fcom.cc.utah.edu>
  6. Sender: news@fcom.cc.utah.edu
  7. Organization: University of Utah Computer Center
  8. References: <1992Aug31.143034.12176@visus.com>
  9. Date: Tue, 1 Sep 92 00:27:28 GMT
  10. Lines: 33
  11.  
  12. In article <1992Aug31.143034.12176@visus.com> jml@visus.com (Jim Large) writes:
  13. > In article <1992Aug25.092051@fdr.jsc.nasa.gov> shirley@fdr.jsc.nasa.gov (Bill  
  14. > Shirley [CSC]) writes:
  15. > > 
  16. > > Does the -run method of Application NEED to be invoked.
  17. > > I need a little bit more control over the event loop.
  18. >   I've found that some desirable things happen when -[Application run] is
  19. > called.  The only one I know about for sure is that the application's icon
  20. > (which is highlighted when you launch the app) becomes unhighlighted.
  21.  
  22. You have to be a bit careful even during the event loop itself.  [NXApp run]  
  23. takes care of some things that are not events.  One example is reseting cursor  
  24. rects (although you can easily set them explicitly to prevent this problem).   
  25. There are other examples noted in the concept docs.
  26.  
  27. There really should be a way to "flush" NXApp, dispatching all pending events  
  28. and performing any other NXApp chores, and then returning.  I do not know of  
  29. any way to kludge this with the current API (the modal loop methods almost fit  
  30. the bill but they all discard some events).
  31.  
  32. I would suggest NeXT add the following method to NXApp to achieve this:
  33.  
  34.     - flushEvents:(int)mask waitFor:(double)timeout threshold:(int)level
  35.  
  36. with parameters analogous to -getNextEvent:waitFor:threshold:.  Anyone at NeXT  
  37. listening?
  38.  
  39. --
  40. --------------------------------------------------------------------
  41. Paul Burchard    <burchard@math.utah.edu>
  42. ``I'm still learning how to count backwards from infinity...''
  43. --------------------------------------------------------------------
  44.