Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listing the names contained in a record



At 10:23 PM +1300 30/10/02, Andy Wylie wrote:
on Wed, 30 Oct 2002 01:28:42 -0600 Jeffrey Mattox wrote:

Is there a way to get a list of the names of the name/value pairs in a record?

There's some hairy hacks but RecordAccess OSAX (not X) is the only sane way
I know of but I don't know where you can find it. Otherwise it's list
tricks.

RecordAccess OSAX is the way to go if you are not under OSX.

Otherwise, if you work with Smile, one of the hairy hacks Andy is mentioning consists mostly in using Smile's "display" command to make the record into text, parsing the resulting string, and using "do script" (or "run script") to retrieve the value of a given property.

Ex. (tested)

set x to {myprop:3.14}

set s to display x --> "{myprop:3.14}"

set ps to text 2 thru ((offset of ":" in s)-1) in s --> "myprop"

do script (ps & " of " & s) --> 3.14

Emmanuel -- not part of the script
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Listing the names contained in a record (From: Andy Wylie <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.