• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to adjust this script to work on Snow Leopard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to adjust this script to work on Snow Leopard?


  • Subject: Re: How to adjust this script to work on Snow Leopard?
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 3 Dec 2010 16:21:22 -0800

On Dec 1, 2010, at 9:45 AM, Paul Berkowitz wrote:

> On 11/30/10 11:30 PM, "Jon Pugh" <email@hidden> wrote:
>
>> 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.
>
> This makes sense. Thanks for the insight, Jon.

His answer also has the virtue of being correct. =)  More precisely, the problem should only occur when the caller is running 10.6 and the callee is running 10.5 or earlier.  Otherwise, you're free to mismatch case however you like.

> So this would only ever come up when two scripts (in separate script files)
> are involved, and only if the called script were an older script saved in OS
> 10.5 or earlier, and the calling script is a newer script saved in OS 10.6?
> (Or vice versa, I guess.) Or have I misunderstood you?
>
> Or would the operating system the scripts are being run on play a part? ...

It's the system version the scripts are being run on, not where they were created, that's relevant.


--Chris Nebel
AppleScript Engineering

 _______________________________________________
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

References: 
 >Re: How to adjust this script to work on Snow Leopard? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Preview versus Icon
  • Next by Date: FindReplace by list
  • Previous by thread: Re: How to adjust this script to work on Snow Leopard?
  • Next by thread: Re: How to adjust this script to work on Snow Leopard?
  • Index(es):
    • Date
    • Thread