Re: resetting record values to ""
Re: resetting record values to ""
- Subject: Re: resetting record values to ""
- From: Nigel Garvey <email@hidden>
- Date: Wed, 3 Jan 2001 04:30:54 +0000
Richard 23 wrote on Tue, 2 Jan 2001 02:08:46 -0800:
>
property Current_Record : {}
>
>
on run
>
TestMe()
>
end run
>
>
on TestMe()
>
set Current_Record to NewRecord()
>
set theRec to Current_Record
>
set {theRec's Findings, theRec's Impression} to {"deceased", "bugger"}
>
ResetRecord(a reference to Current_Record) --a reference to theRec)
>
Current_Record
>
end TestMe
>
>
on NewRecord()
>
return {Findings:"", Impression:""}
>
end NewRecord
>
>
on ResetRecord(theRef)
>
set theRef's contents to NewRecord()
>
end ResetRecord
This last handler is another Richard 23-ism :-) - just a non-obvious way
of returning a value from a handler to a variable outside it. It would be
easier and more obvious just to use 'set Current_Record to NewRecord()'
again.
NG