Re: When are properties set?
Re: When are properties set?
- Subject: Re: When are properties set?
- From: Stan Cleveland <email@hidden>
- Date: Thu, 04 Sep 2008 18:24:35 -0700
- Thread-topic: When are properties set?
On 9/4/08 5:40 PM, "Luther Fuller" wrote:
> On Sep 4, 2008, at 6:34 PM, Stan Cleveland wrote:
>> Typically, when a property is changed, the new value is stored in memory
>> until script execution is complete. At that point the state of the script is
>> written back to the script file, including the value of said property.
>> (Perhaps you've noticed that the modification date of a script application
>> changes with every execution.)
>>
>> By interrupting your script before execution is complete, the opportunity to
>> store the property is lost. The last stored state--from the most recent
>> *complete* run--will be the starting state of the next run.
>
> That seems to make a lot of sense and is consistent with my observations. I
> don't guess there is any way to force the write-back prior to normal quit?
The short answer is "maybe." You might be able to use script objects, which
allow you to control "write-back" to some extent, to accomplish your goal.
But that gets into more complex details than I can address myself.
However, I'd recommend Matt Neuburg's book "AppleScript, The Definitive
Guide" (2nd ed.). It covers this stuff in detail starting with "File-level
persistence" on page 117 through "Data Storage" which ends on page 121.
Stan C.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden