Re: Position of an element in a list
Re: Position of an element in a list
- Subject: Re: Position of an element in a list
- From: Shane Stanley <email@hidden>
- Date: Wed, 2 Aug 2017 20:37:39 +1000
On 2 Aug 2017, at 6:29 pm, Nigel Garvey <email@hidden> wrote:
>
>> Would fail under 10.10 and earlier.
>
> I wondered about that myself. But would it? AS dates wouldn't be bridged
> to NSDates, 'tis true, but wouldn't they then be packaged as
> NSAppleEventDescriptors? They only need to be compared here, not
> understood. The handler works with AS values like 'Wednesday'.
Running under 10.10 in Parallels here, it fails. But then so does 'Wednesday',
so I suppose I could be seeing an artefact of emulation. Maybe someone running
10.10 for real can check.
I have a vague memory of NSAppleEventDescriptor essentially treating isEqual:
as little more than a pointer comparison, but I might be wrong on that. (Or
that could have changed since 10.10, I suppose.)
The other point worth mentioning is that the ASObjC method always considers
case when strings are involved, unlike AppleScript.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
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