Re: How to get all IDs of an object
Re: How to get all IDs of an object
- Subject: Re: How to get all IDs of an object
- From: Shane Stanley <email@hidden>
- Date: Fri, 22 Mar 2013 16:26:52 +1100
On 22/03/2013, at 1:13 PM, Michelle Steiner <email@hidden> wrote:
> However, the difference between an Applescript list and an array is that a list can contain disparate elements; they do not all have to be of the same type. The elements of an array, however are all of the same type.
That's arguably not so; it's also arguable that AS's lists comply with that definition...
Objective-C arrays can contain a mixture of classes, and if you pass an AS list to a Cocoa app, that's what it gets converted into.
Now you can argue that Objective-C arrays can't contain primitive types like ints, chars, floats, etc, and that essentially they are just arrays of objects (subclasses of the same class), meeting your requirement. By that same argument, AS's lists are also always items of the same type, because AS doesn't support ints, chars, or any primitive types -- they are all really boxed as objects or descriptors.
I suspect the choice of the term list was more about trying to avoid non-geeky names in favor of more meaningful names. Hence list instead of array, real instead of float, and coerce instead of cast.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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