home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13183 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.9 KB  |  61 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!darwin.sura.net!jvnc.net!yale.edu!cs.yale.edu!bitting-douglas
  3. From: bitting-douglas@CS.YALE.EDU (Pondscum Czar)
  4. Subject: AppleEvent gets munged by AEProcessAppleEvent
  5. Message-ID: <1992Jul29.221720.28079@cs.yale.edu>
  6. Sender: news@cs.yale.edu (Usenet News)
  7. Nntp-Posting-Host: zoo-gw.cs.yale.edu
  8. Organization: Organization?  It's around here somewhere...
  9. Distribution: comp
  10. Date: Wed, 29 Jul 1992 18:17:14 GMT
  11. Lines: 48
  12.  
  13.  
  14. Hi.
  15.  
  16. I have a program that has the following flow of control when it receives
  17. an 'oapp' event:
  18.  
  19. DoHighLevelEvent(&theEvent); // Event is an EventRecord
  20.                              // theEvent was verified to have an
  21.                              // AppleEvent
  22.  
  23. ...
  24.  
  25. void DoHighLevelEvent (EventRecord *anEvent)
  26. {
  27.   OSErr err;
  28.  
  29.   err = AEProcessAppleEvent(anEvent); // an event was verified to
  30.                                       // correctly contain an Apple
  31.                                       // Event.
  32.   ... 
  33. [  ErrorHandling  ]
  34.   ...
  35. }
  36.  
  37. OSErr HandleAEOpenApplication(AppleEvent *ae, AppleEvent *reply, long refCon)
  38. {
  39.   if (!ae) DoError("NULL Apple Event!");
  40.   return MyGotRequiredParameters(ae);
  41. }
  42.  
  43. The problem is that DoError is always called from
  44. HandleAEOpenApplication... somewhere the system is losing the apple
  45. event and I don't understand why.
  46.  
  47. Can anyone help me out here?  This is so simple, it's ridiculous... but
  48. why it isn't working is boggling to my mind... yes, the handler was
  49. installed correctly, or it wouldn't even get that far, no?
  50.  
  51. --Doug
  52. --
  53.  ...Doug Bitting... || "But the wisdom that comes from heaven is first
  54.                     ||  of all pure; then peace loving, considerate,
  55. bitting@cs.yale.edu ||  submissive, full of mercy, and good fruit,
  56. doug@yalevm.bitnet  ||  impartial and sincere."  -- James 3:17
  57. -- 
  58. --
  59. The new Congressmen say they're going to turn the government around.  I
  60. hope I don't get run over again.
  61.