Why am I getting this error?
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.