• 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: NSArray from an AS list of lists or records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArray from an AS list of lists or records


  • Subject: Re: NSArray from an AS list of lists or records
  • From: "Nigel Garvey" <email@hidden>
  • Date: Sun, 14 May 2017 12:13:06 +0100

Shane Stanley wrote on Sun, 14 May 2017 09:44:10 +0200

>On 14 May 2017, at 12:07 am, Nigel Garvey <email@hidden>
wrote:
>>
>> It seems as unlikely to be accidental as it is to be deliberate!
>
>I guess there's no *correct* behavior in the sense that it's entirely
>the work of the scripting bridge, rather than Objective-C itself (and
>therefore probably unlikely to change) -- it's not an issue Objective-C
>ever faces. The nearest thing is reading property lists, where you can
>specify three options (immutable, mutable containers, and mutable
>containers and leaves).
>
>To convert the containers, the bridge needs to create a mutable
>container first and then add the items to it, so I suppose they just
>thought they'd return it as is, rather than make an immutable copy.

And I suppose there's some logic to the idea that, while the class of
the containing array is explicitly specified in the script code, the
classes of its contents are just the scripting bridge going for the
nearest Objective-C equivalents to the AS originals. Mutable arrays and
dictionaries are arguably more nearly equivalent to AS lists and records
than are the immutable types.

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

  • Prev by Date: Re: NSArray from an AS list of lists or records
  • Next by Date: Re: Property List Tools osax with Framework Foundation
  • Previous by thread: Re: NSArray from an AS list of lists or records
  • Next by thread: 10.12.5 at work.
  • Index(es):
    • Date
    • Thread