• 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: persistant state: what is best technique?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: persistant state: what is best technique?


  • Subject: Re: persistant state: what is best technique?
  • From: Emmanuel <email@hidden>
  • Date: Tue, 16 Jan 2001 02:22:33 +0100

At 16:38 +0100 15/01/01, Michael Turner wrote:
>I am scripting Quark scripts, and am considering breaking one of my largish
>scripts into several quickeys activated scripts. But if I do this, I need to
>artificially preserve the state of one or two variables from script to
>script. I can think of a couple ways to do this, but I don't like any of
>them. Does anyone have a suggestion?

I suggest that you maintain a script file, and that you store the
persistent variables as properties.

Example.
The script file will contain:
-------------------
property myData:{}
-------------------

You retrieve the data with:
------------------- non tested
set theScript to (load script alias thePathName)
set theData to (get myData of theScript)
-------------------

You store the data with:
------------------- non tested
set theScript to (load script alias thePathName)
set myData of theScript to theData
store script in (alias thePathName) replacing yes
-------------------

HTH
Emmanuel


References: 
 >persistant state: what is best technique? (From: Michael Turner <email@hidden>)

  • Prev by Date: Re: 'to' as a handler parameter label
  • Next by Date: Re: Variable names on the fly?
  • Previous by thread: persistant state: what is best technique?
  • Next by thread: Re: persistant state: what is best technique?
  • Index(es):
    • Date
    • Thread