• 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: Searching for the equivalent of coercing to type "record"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for the equivalent of coercing to type "record"


  • Subject: Re: Searching for the equivalent of coercing to type "record"
  • From: John W Baxter <email@hidden>
  • Date: Sat, 8 Mar 2003 22:14:55 -0800
  • Envelope-to: email@hidden

Emmanuel was quoted as saying:
>>----------------------------
>>run script ("{<<class usrf>>:{\"a\", \"b\"}} as record")
>> --> {a:"b"}
>>----------------------------

>>----------------------------
>>run script ("{<<class usrf>>:{\"a\", \"b\"}} as record")
>> --> {a:"b"}
>>----------------------------

Note that you will have slight oddities if the names ("a" above) happen to
collide with known terminology words:

set a to run script ("{+class usrf;:{\"application\", \"beer\"}} as record")
{
|application|:"beer"
}
but at least the item is still inside the user fields item:
Script Debugger's AE Print display:
{
usrf:[
"application",
"beer"
]
}


And, somewhat to my surprise, here's a case where app isn't expanded to
application but is recognized:
set a to run script ("{+class usrf;:{\"app\", \"beer\"}} as record")
{
|app|:"beer"
}

This phenomenon may or may not get in the way of the desired use of the
converted data.

I think I'd prefer to use one of the hash table solutions.

--John
--
John Baxter email@hidden Port Ludlow, WA, USA
Is beer an application?
_______________________________________________
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: Searching for the equivalent of coercing to type "record"
      • From: Malcolm Fitzgerald <email@hidden>
References: 
 >Re: Searching for the equivalent of coercing to type "record" (From: Steve Cunningham <email@hidden>)

  • Prev by Date: Re: New scripter Q: Success, but a couple of questions.
  • Next by Date: Mail problems with special characters
  • Previous by thread: Re: Searching for the equivalent of coercing to type "record"
  • Next by thread: Re: Searching for the equivalent of coercing to type "record"
  • Index(es):
    • Date
    • Thread