Re: resetting record values to ""
Re: resetting record values to ""
- Subject: Re: resetting record values to ""
- From: "Marc K. Myers" <email@hidden>
- Date: Tue, 02 Jan 2001 00:57:44 -0500
- Organization: [very little]
Victor Yee wrote:
>
Date: Mon, 1 Jan 2001 20:45:55 -0500
>
From: Victor Yee <email@hidden>
>
Subject: Re: resetting record values to ""
>
To: Applescript-Users <email@hidden>
>
>
Hi Bryan,
>
>
Would this work for you?
>
>
property defaultRecord : {a:"", b:"", c:""}
>
>
set thisRecord to {a:"A", b:"B", c:"C"}
>
>
thisRecord -->{a:"A", b:"B", c:"C"}
>
>
set thisRecord to defaultRecord
>
>
thisRecord -->{a:"", b:"", c:""}
You have to be careful with this one. By setting thisRecord to
defaultRecord you are creating a data sharing relationship. If you later
change the values of any of the properties of thisRecord, the
corresponding properties in defaultRecord will be changed as well. If
you "copy" defaultRecord to thisRecord, instead of using the "set"
command, you avoid this complication.
Marc [1/2/01 12:57:05 AM]