Re: How to adjust this script to work on Snow Leopard?
Re: How to adjust this script to work on Snow Leopard?
- Subject: Re: How to adjust this script to work on Snow Leopard?
- From: Jon Pugh <email@hidden>
- Date: Tue, 30 Nov 2010 23:30:26 -0800
At 7:56 PM -0800 11/30/10, Paul Berkowitz wrote:
>On 11/29/10 2:32 PM, "Christopher Nebel" <email@hidden> wrote:
>
> > The problem has to do with changes to case-sensitivity in Snow Leopard
> > AppleScript to support AppleScriptObjC. Change the handler name to
>> all-lowercase (e.g., "getname") or put it in bars (e.g., "|getName|"), change
>> the calling script to match, and it should work.
>
>You're not kidding, Chris? Handler names with upper-case letters won't work
>in 10.6? (I'm still in 10.5.8). Or only under certain circumstances?
It's only when talking between OS/AppleScript versions.
In the past, AppleScript internally lowercased all handler names in messages, to allow case insensitivity. Thus, it didn't matter if GetName called getName. They would both use getname.
However, it sounds like AppleScriptObjC needed to preserve the caller's case so that it could match that to the ObjC method names. Thus, now the caller and callee must match, or if you can't change the caller (such that it is calling with an old lowercase message), or if the callee is running an older AppleScript (such that it expects lowercase messages), then you need to play some games to ensure that the messages are properly handled.
Basically, if everything is running on the same OS/AppleScript, then you're fine. If you're talking between 10.5 and 10.6 (or other permutations) then you may need to be careful and more explicit about your handler names.
Jon
_______________________________________________
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