Re: Back to Dynamic Records (Was: Re: interesting discovery (trying to get record labels as strings))
Re: Back to Dynamic Records (Was: Re: interesting discovery (trying to get record labels as strings))
- Subject: Re: Back to Dynamic Records (Was: Re: interesting discovery (trying to get record labels as strings))
- From: "Neal A. Crocker" <email@hidden>
- Date: Mon, 3 Dec 2001 13:40:05 -0800
on 12/3/01 10:19 AM, Neal A. Crocker at <email@hidden> wrote:
you can shorten that to:
> {{+class usrf;:{"hello", "goodbye"}}} as string as record
-- returns: {hello:"goodbye"}
Neal
This is great for my question about creating records during the running of a
script. No offense to anyone (has or others), but this is a lot easier than
the other methods for accomplishing what I want to accomplish. Does anyone
(Chris N or others) know if this is expected behavior or what versions of
Applescript this works in. If it is normal behavior, it will be a great step
forward for my wordcount script
Thanks for pointing that out Neal
--
Greg Back
email@hidden -for a while it said email@hidden. That's wrong
the result of {{hello:"goodbye"}} as string, which is
"usrflist&TEXThelloTEXTgoodbye", is a
bug, according to Chris Nebel (from an earlier post of his in the
"interesting discovery..." thread) which appears in many versions of
Applescript. The fact that it can be made into a record was pointed
out by Victor Yee and is probably a related bug. As Chris pointed
out, the first bug will be eliminated (drat! this "bug" is very
useful...) and the second bug (assuming its actually a bug) will
probably be eliminated as well (again drat! manipulation of raw data
in a string which can then be converted to a record is very useful),
so the trick of constructing a record from strings using "{{+class
usrf;:{"hello", "goodbye"}}} as string as record" will break down in
some future version of Applescript.
Neal.
Victor Yee <email@hidden>