Re: creating your own commands
Re: creating your own commands
- Subject: Re: creating your own commands
- From: Shane Stanley <email@hidden>
- Date: Sat, 26 Dec 2015 22:58:32 +1100
> On 26 Dec 2015, at 8:39 PM, 2551 <email@hidden> wrote:
>
> I guess it would be the four letter codes; I don’t think at that point I had any scripting additions in the script; it was pretty bare bones.
It's not a question of additions in the script -- it's additions installed. In the absence of a "use" statement, the terminology from all additions you have installed is loaded. That's one of the reasons additions are a pain: it's all or none.
>
> I don’t quite understand the mechanism behind the explanation, though, in two respects:
>
> i. How would the same script and the same SDEF file have a clash on 10.11 but not on 10.9?
Different additions installed.
>
> ii. and how would adding ‘use framework “Foundation” serve to avoid a clash in Apple Event codes?
Once you have a "use" statement of any kind, scripting addition terminology is not loaded unless you specifically ask for it via "use scripting additions" or "using terms from scripting additions". So adding the "use" statement effectively stops the loading of terminology from scripting additions.
The other potential issue to watch out for is that sdef data is cached, and it's only updated if the modification date changes. And it's the modification of the top-level bundle directory that matters, not that of the .sdef file. ASObjC Explorer makes sure the bundle's mod date gets updated with every change, but depending how you're editing things, it's possible for that not to happen.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden