Re: Records
Re: Records
- Subject: Re: Records
- From: "Bryan" <email@hidden>
- Date: Thu, 01 Mar 2001 04:42:27 -0500
Wait...
isn't that the same as saying:
run script {<<class usrf>>:{"a", 1, "b", 2}}
I like it...
a simple coercion to user record class,
and Vanilla to boot.
Bryan
----------
>
From: Paul Berkowitz <email@hidden>
>
To: Applescript-Users <email@hidden>
>
Subject: Re: Records
>
Date: Now Thu, Mar 01, 2001, 03:04 AM
>
>
On 2/28/01 11:15 PM, "Emmanuel" <email@hidden> wrote:
>
>
> At 12:24 -0600 28/02/01, Olof wrote:
>
>>
>
>> Here's the easiest way to do it using only the standard additions:
>
>>
>
>> __begin script__
>
>>
>
>> to usrf(theList)
>
>> set n to {+class usrf;:theList}
>
>> run script "
>
>> to run (arg)
>
>> arg as record
>
>> end run " with parameters n
>
>> end usrf
>
>>
>
>> usrf({"a", 1, "b", 2})
>
>
>
> Alternately, and maybe less cryptic:
>
>
>
> -------------------------
>
> on usrf(theList)
>
> script
>
> {<<class usrf>>:theList}
>
> end script
>
> run script result
>
> end usrf
>
>
>
> usrf({"a", 1, "b", 2})
>
> -------------------------
>
>
Wow. Definitely less cryptic.
>
>
--
>
Paul Berkowitz
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users