Re: Persistant Properties
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