• 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: Preferences are cached
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preferences are cached


  • Subject: Re: Preferences are cached
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 23 Oct 2013 10:13:46 -0500

On Oct 22, 2013, at 5:44 PM, Shane Stanley wrote:

> On 23 Oct 2013, at 9:02 AM, Luther Fuller <email@hidden> wrote:
>
>> I just read the article "Preferences are cached" here:
>> http://hints.macworld.com/article.php?story=20130908042828630
>>
>> Is this going to change the way an AppleScripted application writes to it's .plist preference file?
>
> You shouldn't write to the preferences file of an application when it's running (or even for a while after it has quit). That's always been the case, but now it's (much) more so. If you want to save some information in a property list, create your own .plist file.


My application does have it's own .plist preference file, but ...
I need to be more specific.

Suppose you have an AppleScripted application, let's call it "MyApplication". When "MyApplication" is launched, it gets the frontmost application and if it is not "SomeApplication" it quits.
If it is "SomeApplication", then "MyApplication" reads a value from the preference file of "SomeApplication" and continues to perform some action based on that value … then quits.

What would happen in this scenario:
1. User has "SomeApplication" open and frontmost.
2. User runs "MyApplication" … and obtains the desired result.
3. User modifies the preferences of "SomeApplication", changing the value, above.
4. User runs "MyApplication", again … but what is the result?

Would "MyApplication" read the correct changed value in step 4 ?

(This scenario is based on how one of my applications works. Will it break in 10.9 ? )




 _______________________________________________
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


  • Follow-Ups:
    • Re: Preferences are cached
      • From: Shane Stanley <email@hidden>
    • Mavericks and scripted apps
      • From: Hudson Barton <email@hidden>
    • Re: Preferences are cached
      • From: Ron Hunsinger <email@hidden>
References: 
 >Preferences are cached (From: Luther Fuller <email@hidden>)
 >Re: Preferences are cached (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: is "tell" dead?
  • Next by Date: Re: is "tell" dead?
  • Previous by thread: Re: Preferences are cached
  • Next by thread: Re: Preferences are cached
  • Index(es):
    • Date
    • Thread