• 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: "Bryan" <email@hidden>
  • Date: Tue, 02 Jan 2001 14:36:01 -0500

Richard,

Your post of 4:43AM was quite impressive, and I will definitely find it
useful, thank you.

As for the current message (5:08AM) I took me considerable time to
figure out where you were going with this. I read the entire thing without
understanding how it improved over the other models,

Then I asked how does this prevent a data write-back,
I take it, that the idea is, there is nothing to write back to?

Very clever, Thanks; I would have never thought of that.
Another compound to add to the pharmacopaea.

Bryan

----------
>From: Richard 23 <email@hidden>
>To: <email@hidden>
>Subject: Re: resetting record values to ""
>Date: Tue, Jan 2, 2001, 5:08 AM
>

> regarding Paul's "there's no easy way to do it" answer, Bryan said:
>
>>I was afraid of that, Unfortunately the the empty record is:
>
>>property record_out : ** expletive deleted **
>
>>And I have to reset it multiple times in the same script.
>>I was hoping for something like:
>
>>set every value of record record_out to ""
>
>>But I may have to just use a handler.
>
>
> Bryan: maybe I'm missing something but I don't see why you are bothering
> reset properties of a record at all. Why not make the record defined in
> record_out the result of a handler (kinda like a constructor function)
> and set the value of your target record to the result of that handler?
>
> Something like:
>
> 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
>
> Note that to set the referenced record it must be a top-level property or
> global otherwise it will not be visible to the ResetRecord handler.
>
> R23
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


  • Prev by Date: De-Selecting all selected files/folders
  • Next by Date: Re: De-Selecting all selected files/folders
  • Previous by thread: Re: resetting record values to ""
  • Next by thread: Re: resetting record values to ""
  • Index(es):
    • Date
    • Thread