On 7/22/05, Peter N Lewis said:
>>I changed the declaration to:
>>
>>function HandleAEquit (const quitAppleEvent: AppleEvent; var reply:
>>AppleEvent; handlerRefCon: LongInt): OSErr; MWPascal;
>
>The interface for an AE handler should be:
>
>function Handler( const event: AppleEvent;
>var reply: AppleEvent; refcon: SInt32 ): OSErr;
Except that Free Pascal requires the 'MWPascal' tag (instead of the
'stdcall' tag), so changing the var to const is not sufficient. I had to
change the 'stdcall' tag to the 'MWPascal' tag as well.
This was a lesson in 'const', which I had never seen or used before.
--
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.