Re: NSArray from an AS list of lists or records
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