• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why am I getting this error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Why am I getting this error? (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: nil messaging? Is it safe?
  • Next by Date: Re: NSImageView scrolling
  • Previous by thread: Why am I getting this error?
  • Next by thread: How come bundle is just compiling as a folder?
  • Index(es):
    • Date
    • Thread