Re: Why am I getting this error?
Re: Why am I getting this error?
- Subject: Re: Why am I getting this error?
- From: Cameron Hayne <email@hidden>
- Date: Sat, 28 Sep 2002 06:23:19 -0400
On 28/9/02 3:13 am, "Ken Tozier" <email@hidden> wrote:
>
I'm trying to install an AppleEvent handler and according to all
>
documentation I can find, It looks right. Can anyone see what I'm doing
>
wrong?
>
Error message:
>
warning: passing arg 1 of `NewAEEventHandlerUPP' from incompatible
>
pointer type
>
Relevant code:
>
Header file:
>
OSErr FileTools(AppleEvent *theEvent, AppleEvent *reply, long
>
*refCon);
>
[...]
>
// I get the error message when I try this...
>
gScriptToolsUPP = NewAEEventHandlerUPP( FileTools );
Your function 'FileTools' does not have the correct signature. The event
handler must be of type AEEventHandlerProcPtr which is defined as:
typedef OSErr(* AEEventHandlerProcPtr) (
const AppleEvent *theAppleEvent,
AppleEvent *reply,
SInt32 handlerRefcon
);
You are missing the 'const' in the first parameter.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.