Re: names of a record's items
Re: names of a record's items
- Subject: Re: names of a record's items
- From: "koenig.yvan" <email@hidden>
- Date: Wed, 09 Apr 2014 16:27:18 +0200
Way back when Matt Neuburg wrote AppleScript: The Definitive Guide, he stated that:
“There is no built-in way to obtain a list of the names of the items of a record…I have seen many elaborate attemtps to work around this problem, but I’m not going to show you any of them. This is a big shortcoming of AppleScript itelf, and it needs to be fixed on the level of AppleScript itself”.
I guess we’re still waiting for that fix, and I was wondering if anyone would care to share any "elaborate attempts” they know of?
TIA
Phil
Some are waiting but thanks to Shane Stanley some others are doing the trick easily.
In ASObjC Runner dictionary we may read :
all labels of v : Returns the labels of a record as a list of strings. all labels of record : The record. [for values list of any] : An optional list of values. If provided, only labels for properties containing these values will be returned. → list of text : The list of labels.A typical example would be: tell application "ASObjC Runner"
all labels of {theFirst:1, theSecond:2, theThird:3}
--> {"theFirst", "theSecond", "theThird"}
all labels of {theFirst:1, theSecond:2, theThird:1} for values {1}
--> {"theFirst", "theThird"}
end tell
At this time I can't remember if Shane has already published a Mavericks library to do that.
Yvan KOENIG (VALLAURIS, France) mercredi 9 avril 2014 16:27:13
|
_______________________________________________
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