• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Listing the names contained in a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listing the names contained in a record


  • Subject: Re: Listing the names contained in a record
  • From: Emmanuel <email@hidden>
  • Date: Wed, 30 Oct 2002 17:03:13 +0100

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>)

  • Prev by Date: Program Linking in OS X
  • Next by Date: Re: Printing the result window
  • Previous by thread: Re: Listing the names contained in a record
  • Next by thread: Re: Listing the names contained in a record
  • Index(es):
    • Date
    • Thread