• 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: Position of an element in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 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.

And just a nit: it's also going to fail under version if system clock ticks
over a second between the two calls to current date.

--
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

References: 
 >Re: Position of an element in a list (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Position of an element in a list
  • Next by Date: Re: Position of an element in a list
  • Previous by thread: Re: Position of an element in a list
  • Next by thread: Re: Position of an element in a list
  • Index(es):
    • Date
    • Thread