Re: resetting bindings
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.