• 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: How do I save an array in plist?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I save an array in plist?


  • Subject: Re: How do I save an array in plist?
  • From: Brian Christmas <email@hidden>
  • Date: Mon, 03 Dec 2012 10:05:39 +1100

Thanks once again Shane.

I used tell defaults to setObject_forKey_(clientMax, "clientMaxSave") in the appropriate places, and all's well

Regards

Santa

On 02/12/2012, at 9:54 PM, Shane Stanley <email@hidden> wrote:

On 02/12/2012, at 9:34 PM, Brian Christmas <email@hidden> wrote:

> The stepper and text field are bound to the clientMax variable.

If you're going to bind their contents to the script's clientMax property, you will have to use setObject_forKey_ to save its value to defaults. Again, as you have it, all you're doing is changing the value of a normal AS variable -- you're never storing it in defaults.

But I suspect what you really want to do is bind the stepper's value to Shared User Defaults Controller, with a Controller Key of clientMaxSave. With that, every time you click on the stepper it performs the equivalent of "tell defaults to setObject_forKey_(<the stepper's value>, "clientMaxSave")". But obviously it won't change the value of the clientMax variable.

--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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: How do I save an array in plist? (From: Brian Christmas <email@hidden>)
 >Re: How do I save an array in plist? (From: Shane Stanley <email@hidden>)
 >Re: How do I save an array in plist? (From: Brian Christmas <email@hidden>)
 >Re: How do I save an array in plist? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: How do I save an array in plist?
  • Next by Date: Re: Checking on the existence of a file
  • Previous by thread: Re: How do I save an array in plist?
  • Next by thread: Nearly complete
  • Index(es):
    • Date
    • Thread