Re: Another AppleScript-ObjC Bridge Question
Re: Another AppleScript-ObjC Bridge Question
- Subject: Re: Another AppleScript-ObjC Bridge Question
- From: Shane Stanley <email@hidden>
- Date: Tue, 10 Nov 2015 22:25:57 +1100
On 10 Nov 2015, at 9:46 PM, Dave <email@hidden> wrote:
>
> Just to clarify, I don’t need a “_” at all, anywhere?
No.
> The reason I added them is because in uses them in the example at:
That's pre-10.9 syntax. Open Script Editor, and enter the code you see there:
on square_(aNumber)
return aNumber ^ 2
end square_
Now compile and it will end up as:
on square:aNumber
return aNumber ^ 2
end square:
Same thing, different syntax.
(And you should always use Open with External Editor so you can edit and compile your code outside Xcode -- if you don't, you won't catch things like terminology clashes.)
See the section on handlers in the AppleScript Language Guide.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden