• 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
Why am I getting this error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why am I getting this error?


  • Subject: Why am I getting this error?
  • From: Ken Tozier <email@hidden>
  • Date: Sat, 28 Sep 2002 03:13:33 -0400

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);

Source file:
#include "AEHandlers.h"
#import <Foundation/Foundation.h>

OSErr FileTools(AppleEvent *theEvent, AppleEvent *reply, long *refCon)
{
// code here
}

Init file:
#include "InitUtils.h"
#include "AEEventConstants.h"
#include "AEHandlers.h"
#include <Foundation/Foundation.h>

static AEEventHandlerUPP gScriptToolsUPP = NULL;

OSErr SAInitialize(CFBundleRef inAdditionBundle)
{
OSErr theErr = noErr;

// I get the error message when I try this...
gScriptToolsUPP = NewAEEventHandlerUPP( FileTools );

// ... and when I try this
gScriptToolsUPP = NewAEEventHandlerUPP( &FileTools );

// more code follows
}

Relevant documentation links:
"http://developer.apple.com/technotes/tn/tn1164.html";
Listing 1. Installing event and coercion handlers in the system
dispatch table

"http://developer.apple.com/techpubs/macosx/Carbon/
interapplicationcomm/AppleEventManager/Apple_Event_Manager/index.html"


Anyone see the problem?

Thanks for any help,

Ken
_______________________________________________
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.

  • Follow-Ups:
    • How come bundle is just compiling as a folder?
      • From: Ken Tozier <email@hidden>
    • Re: Why am I getting this error?
      • From: Cameron Hayne <email@hidden>
References: 
 >Newbie: Exporting symbols - how? (From: Ken Tozier <email@hidden>)

  • Prev by Date: sub classing NSTableView
  • Next by Date: Re: sub classing NSTableView
  • Previous by thread: Newbie: Exporting symbols - how?
  • Next by thread: Re: Why am I getting this error?
  • Index(es):
    • Date
    • Thread