• 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: resetting bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resetting bindings


  • Subject: Re: resetting bindings
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 15 Jul 2004 08:09:46 -0700

On Jul 15, 2004, at 7:19 AM, Doug Steigerwald wrote:

Is there a way to reset bindings to some sort of defaults (from a file, etc) while the application is still running? Trying to minimize code on my part for the preferences of an app (have a lot of check boxes and pulldown menus, etc that hide/show buttons, and do some other stuff) and want to use cocoa bindings.

So do you want to reset the bindings connections, or the values of the properties to which display elements are bound? I'd guess the latter, in which case:
(a) All you need do is set the property values appropriately -- bindings will cause the displayed values to be updated accordingly;
(b) NSUserDefaultsController provides 'initialValues' for the "factory settings" to which you can 'revert'.

<http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaBindings/Concepts/NSUserDefaultsController.html>
<http://developer.apple.com/cocoa/cocoabindings.html>
<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >resetting bindings (From: Doug Steigerwald <email@hidden>)

  • Prev by Date: resetting bindings
  • Next by Date: Re: CGDisplayCapture question
  • Previous by thread: resetting bindings
  • Next by thread: multitask with fread?
  • Index(es):
    • Date
    • Thread