opensubscriber
   Find in this group all groups
 
Unknown more information…

m : macpascal@listman.sonic.net 22 July 2005 • 11:54AM -0400

Re: [MacPascal] New interface problem II
by Michael Casteel

REPLY TO AUTHOR
 
REPLY TO GROUP




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

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.