home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14954 < prev    next >
Encoding:
Text File  |  1992-09-03  |  2.1 KB  |  49 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!gatech!darwin.sura.net!haven.umd.edu!ni.umd.edu!zben-mac-ii.umd.edu!user
  3. From: zben@ni.umd.edu (Charles B. Cranston)
  4. Subject: Re: Event Loop
  5. Message-ID: <zben-030992144708@zben-mac-ii.umd.edu>
  6. Followup-To: comp.sys.mac.programmer
  7. Sender: usenet@ni.umd.edu (USENET News System)
  8. Nntp-Posting-Host: zben-mac-ii.umd.edu
  9. Organization: UM Home for the Terminally Analytical
  10. References: <1992Sep1.152720.12544@nic.umass.edu> <1992Sep3.174732.9231@cs.wisc.edu>
  11. Date: Thu, 3 Sep 1992 18:54:19 GMT
  12. Lines: 35
  13.  
  14. In article <1992Sep3.174732.9231@cs.wisc.edu>,
  15. andrewt@scrooge.cs.wisc.edu (Andrew Thomas-cramer) wrote:
  16.  
  17. > isEvent is always 0, fortunately -- but it is not FALSE. GetNextEvent
  18. > returns zero (noErr) unless an error occurs. You're confusing noErr
  19. > with FALSE, both of which are equal to zero.
  20.  
  21. Sigh - wrong.  More dangerous misinformation.  It only took me 45
  22. seconds to pull my Inside Mac off the shelf and find GetNextEvent.
  23. You'd think someone would do that before sending a netnews message
  24. to tens of thousands of people on thousands of computers...
  25.  
  26. Ahem:
  27.  
  28. "Before reporting an event to your application, GetNextEvent first
  29.  calls the Desk Manager function SystemEvent to see whether the system
  30.  wants to intercept and respond to the event.  If so, or if the event
  31.  being reported is a null event, GetNextEvent returns a function result
  32.  of FALSE; a function result of TRUE means that your application should
  33.  handle the event itself."
  34.  
  35. Now, the Desk Manager clause is not as important as it once was.
  36. Since DAs are run in their own layers in system 7 and in a unified
  37. DA layer in system 6 with multifinder, the only time this can make
  38. a difference is on system 6 without multifinder, or system 6 with
  39. multifinder and a DA loaded into the application's heap using the
  40. option key while opening the DA.
  41.  
  42. Modulo this, the result from GetNextEvent is FALSE if a null event
  43. is being reported and TRUE if a real event is being returned.  It
  44. is NOT an error code...
  45.  
  46. And this is what I put in my private email to the original poster.
  47.  
  48. zben@ni.umd.edu     -KA3ZDF
  49.