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

  • Follow-Ups:
    • Re: Position of an element in a list
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: Position of an element in a list (From: "Nigel Garvey" <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