Re: Record/List Coercion
Re: Record/List Coercion
- Subject: Re: Record/List Coercion
- From: email@hidden
- Date: Wed, 30 Apr 2008 11:30:33 +0200
At 5:41 PM -0700 4/29/08, Tom Chen wrote:
1) Is it possible to loop through a record systematically?
PLists are for that. Use for instance XMLLib osax to write:
set thePlist to PlistNew theRecord
Then "PlistGetKeys thePlist" will return the list of the keys and you
can loop through them.
See for one example of use:
http://www.satimage.fr/software/en/smile/xml/plist_tutorial.html
2) Is there a way to preserve ordering of a record coerced to a list
(currently, when I coerce a record to a list, the list has a different
ordering than the record)
Unfortunatel there is no such things as the order of a record. I
don't know of an associative array structure (like AppleScript's
record class) which would respect some order.
Emmanuel
_______________________________________________
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