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: "Nigel Garvey" <email@hidden>
- Date: Wed, 2 Aug 2017 09:29:43 +0100
Shane Stanley wrote on Wed, 2 Aug 2017 13:03:28 +1000:
>On 1 Aug 2017, at 11:52 pm, Yvan KOENIG <email@hidden> wrote:
>>
>> Now that we may use ASObjC, it seems that it's time to drop these
answers.
>
>Up to a point. The ASObjC methods can't be used pre-10.9, but perhaps
more
>importantly, they can't be used with dates before 10.11. So this code:
>
>> set theList to {5, 2, 6, 9, 4, "TTT", 6, current date, 3}
>> its indexOf:(current date) inList:theList
>
>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'.
NG
_______________________________________________
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