Re: Info about AppleScript records
Re: Info about AppleScript records
- Subject: Re: Info about AppleScript records
- From: Paul Skinner <email@hidden>
- Date: Tue, 08 May 2001 11:20:40 -0400
on 5/8/01 3:34 AM, Timothy Bates wrote:
>
On 7/05/2001 11:40 PM, "Matthew Broms" <email@hidden> wrote:
>
> Specifically right now, I9m looking for a way to dynamically set the
>
> key/value pair of a record.
>
>
For all practical purposes, you can't. It is really the single modern
>
language feature which is missing from AS and is the single biggest handicap
>
in terms of using AS as a substitute for Php and asp on web servers.
>
Hopefully Apple are at work addressing this limitation...
Whoa there Tim! You certainly can.
set datastream to "set x to {key:\"value\"}"
set dynamiclyGeneratedRecord to run script datastream
-->{key:"value"}
But, some people don't like 'run script' constructions. And they can slow
down execution (supposedly.untested.) if repeatedly used. SO...
If you don't mind OSAXen then you can get RecordAccess from Ed Lai.
RecordAccess OSAX (Ed Lai - Apple computer 1999)
It allows one to combine two lists to make records, get the keys of a
record as a list and get the value of a given key.
It's available in only one place that I know of. Ed Lai's public folder
on his iTools account. email@hidden.
--
Paul Skinner