• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: resetting record values to ""
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: A 'classic' question
  • Next by Date: more on records, properties and labels
  • Previous by thread: Re: resetting record values to ""
  • Next by thread: Re: resetting record values to ""
  • Index(es):
    • Date
    • Thread