• 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: Coerce string to record or something like that?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coerce string to record or something like that?


  • Subject: Re: Coerce string to record or something like that?
  • From: Emmanuel <email@hidden>
  • Date: Wed, 12 Dec 2001 08:53:23 +0100

At 4:34 +0100 12/12/01, Michael wrote:

>Is there a
>way to easily convert a string like "[status: /"unproc/",lyrics: false]" or
>"status: "unproc",lyrics: false" into a record?

If you set the name to :

"status","unproc","lyrics",false

then storing the name into "theName", then running:

--------------------------
set theRec to run script "{+class usrf;:{" & theName & "}}"
--------------------------

returns:

-- {status:"unproc", lyrics:false}

HTH
Emmanuel






PS
Also interesting as a name

"status","unproc",<<class pnam>>,"Tom"

PPS
Do not write "name" ... in the name! AppleScript might attempt to get its
own name, something which has crashed at least some versions.


References: 
 >Coerce string to record or something like that? (From: Michael <email@hidden>)

  • Prev by Date: Crashing applets OSX 10.1.1
  • Next by Date: Re: Logging on to a Server.
  • Previous by thread: Coerce string to record or something like that?
  • Next by thread: Re: Coerce string to record or something like that?
  • Index(es):
    • Date
    • Thread