• 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: string as key to record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string as key to record


  • Subject: Re: string as key to record
  • From: John Delacour <email@hidden>
  • Date: Mon, 16 Sep 2002 23:43:28 +0100

At 2:05 pm -0700 16/9/02, john mead wrote:

Is it possible to use a string as a key to a record?
Is there a coercion that would work here?

set myRecord to {thingOne:"blah"}
set myKey to "thingOne"
get myKey of myRecord


set varKey to "a"
set varVal to "3"
set varRecord to run script "
{" & varKey & ":" & varVal & "}"
return a of varRecord

-- JD
_______________________________________________
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.

  • Follow-Ups:
    • Re: string as key to record
      • From: Malcolm Fitzgerald <email@hidden>
References: 
 >string as key to record (From: john mead <email@hidden>)

  • Prev by Date: RE: applescript-users digest, Vol 3 #858 - 16 msgs
  • Next by Date: Re: How do I move a message in Mail?
  • Previous by thread: string as key to record
  • Next by thread: Re: string as key to record
  • Index(es):
    • Date
    • Thread