Article View: comp.sys.mac.programmer.codewarrior
Article #1360NIL incoming AppleEvent in high level event handler?
From: JollyRoger
Date: Wed, 01 Nov 2000 16:35
Date: Wed, 01 Nov 2000 16:35
34 lines
2455 bytes
2455 bytes
Can someone tell me what I am doing wrong here? I've got an application
where I install a few AppleEvent handlers, but when those handlers get
called, the AppleEvent parameter is always NIL.
I install the handlers like this:
err = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
NewAEEventHandlerUPP(AEOpenAppHandler), 0, false);
The handlers are prototyped like this:
OSErr AEOpenAppHandler(AppleEvent *theAppleEvent, AppleEvent *reply,
long refCon);
And this is one of the handlers:
OSErr AEOpenAppHandler(AppleEvent *theAppleEvent, AppleEvent *reply,
long refCon) {
AEDesc nameParam;
OSErr err;
err = AEGetParamDesc(theAppleEvent, keyDirectObject, typeBoolean,
&nameParam);
return noErr;
}
When put a breakpoint in the AEOpenAppHandler handler, theAppleEvent is
0 (NIL). What would make this happen? Something wrong with the way I
installed the handler? Something not set correctly in the SIZE resource?
I'm confused here. I've done everything the same way I would do it for
scripting additions; but it's not working like I expect.
Any help appreciated.
Technical Details
Message-ID:
<KDXL5.27431$Fe4.699434@typhoon.austin.rr.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!newsfeed.skycache.com!Cidera!cyclone.tampabay.rr.com!cyclone.austin.rr.com!cyclone2.austin.rr.com!typhoon.austin.rr.com.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bcce,12e87422eb8b0f4d,start X-Google-Attributes: gid10bcce,public X-Google-Thread: 101ec9,12e87422eb8b0f4d,start X-Google-Attributes: gid101ec9,public X-Google-Thread: f635e,12e87422eb8b0f4d,start X-Google-Attributes: gidf635e,public X-Google-Thread: fed41,12e87422eb8b0f4d,start X-Google-Attributes: gidfed41,public X-Google-ArrivalTime: 2000-11-01 08:51:12 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!newsfeed.skycache.com!Cidera!cyclone.tampabay.rr.com!cyclone.austin.rr.com!cyclone2.austin.rr.com!typhoon.austin.rr.com.POSTED!not-for-mail From: JollyRoger <jolly-spam-bites-roger@pobox.com> Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac,comp.sys.mac.programmer.misc,comp.sys.mac.programmer.help Subject: NIL incoming AppleEvent in high level event handler? Organization: very little - at times, chaotic User-Agent: MT-NewsWatcher/3.0 (PPC) Lines: 34 Message-ID: <KDXL5.27431$Fe4.699434@typhoon.austin.rr.com> Date: Wed, 01 Nov 2000 16:35:54 GMT NNTP-Posting-Host: 24.27.6.69 X-Complaints-To: abuse@rr.com X-Trace: typhoon.austin.rr.com 973096554 24.27.6.69 (Wed, 01 Nov 2000 10:35:54 CST) NNTP-Posting-Date: Wed, 01 Nov 2000 10:35:54 CST