• 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: When are properties set?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: When are properties set? (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: When are properties set?
  • Next by Date: Folder Actions Question
  • Previous by thread: Re: When are properties set?
  • Next by thread: Folder Actions Question
  • Index(es):
    • Date
    • Thread