Trying the new interfaces with Free Pascal, using FPCMacOSAll, I am not
able to get my Apple Event handlers to compile.
Declarations which used to work of the form:
function HandleAEquit (var quitAppleEvent: AppleEvent;
var reply: AppleEvent;
handlerRefCon: LongInt): OSErr;
Fail with the error:
main.p:183: error: 43: Incompatible type for arg no. 1: Got
"HandleAEquit(var AEDesc,var AEDesc, LongInt):SmallInt", expected
"<procedure variable type of function(const AEDesc,var AEDesc,
LongInt):SmallInt;MWPascal>"
I changed the declaration to:
function HandleAEquit (const quitAppleEvent: AppleEvent;
var reply: AppleEvent;
handlerRefCon: LongInt): OSErr; MWPascal;
only to get this error:
main.p:68: error: 40: Can't assign values to const variable
referring to the line of code:
if (DoneRequiredParams(quitAppleEvent) = noErr) then
;
Any ideas? Is this fixed with compiler v2.1.1, which I can't find
anywhere? I'm using 2.0.0.
--
Mike Casteel
mac@cast... Seattle, WA
_______________________________________________
MacPascal mailing list
MacPascal@list...
http://lists.sonic.net/mailman/listinfo/macpascal
opensubscriber is not affiliated with the authors of this message nor responsible for its content.