• 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 Properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Persistant Properties


  • Subject: Re: Persistant Properties
  • From: Emmanuel <email@hidden>
  • Date: Mon, 26 Feb 2001 22:18:03 -0500

>Is it correct that properties defined in an Applescript application persist
>between launches, but are only updated if the app is quit in an orderly
>fashion -- ie. any changes are lost if the app crashes?

Yes.

>Is there a way, short of quitting and reopening the app, to save these
>properties in case of a crash, or is it better to write changes to a file
>as they occur and reload that file at launch time?

I'm sorry - I won't have time to test what I propose, but here is what I
should first try.

- encapsulate the script in a "script Whatever" ... "end script" wrapper
- use "path to me" to retrieve the path to the said applet
- use "store script" to save what is now an object script ("Whatever"
should be how you can now refer to it)

I am not excluding that step 1 might be useless, provided you use "me" as a
reference to the script. Ideally, the following one-liner would work:

---------------------------- non tested
store script me in (path to me) with replacing
----------------------------

HTH
Emmanuel


References: 
 >Persistant Properties (From: Nigel Smith <email@hidden>)

  • Prev by Date: Re: Applet's last command doesn't take
  • Next by Date: Re: Selecting every item of one disk's desktop
  • Previous by thread: Persistant Properties
  • Next by thread: Re: random scatter
  • Index(es):
    • Date
    • Thread