Re: resetting record values to ""
Re: resetting record values to ""
- Subject: Re: resetting record values to ""
- From: Richard 23 <email@hidden>
- Date: Tue, 2 Jan 2001 15:05:59 -0800
>
> 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:""}
As to this record copy vs set topic, I add one more method:
-- if you want the default properties reset, without affecting
-- any of the other custom properties which may have been added
set thisRecord to defaultRecord & thisRecord
-- if you want properties not present in thisRecord to get
-- default values from defaultRecord without affecting others
set thisRecord to thisRecord & defaultRecord
-- note that if thisRecord is a reference, the original will
-- not be modified so you'll have to set the original to the
-- result if that was your intention.
R23