Re: Usefulness of NSSharedUserDefaultsController?
Re: Usefulness of NSSharedUserDefaultsController?
- Subject: Re: Usefulness of NSSharedUserDefaultsController?
- From: Rick Mann <email@hidden>
- Date: Wed, 20 May 2009 15:48:02 -0700
Thanks, Steven. I considered that, but wasn't sure it was better (or
worse) than the alternative I described. Can you elaborate on why you
do it that way? I tend to prefer writing methods that encapsulate the
name of the property rather than calling methods that pass the
property name around, but I'm not sure there's anything inherently
better about that. I suppose with your approach, I could take the same
action based on changes in more than one property a little more
conveniently.
Thoughts?
TIA,
Rick
On May 20, 2009, at 15:44:25, Steven Riggs wrote:
I directly bind my UI to the shared user defaults controller and I
use key value observing to watch for changes.
Steven Riggs
On May 20, 2009, at 6:24 PM, Rick Mann wrote:
How useful is it to bind (in IB) to NSSharedUserDefaultsController,
in practice? I have a couple checkboxes bound to properties foo and
bar in my app delegate. There are a couple other properties that
are dependent on foo and bar.
I'd like for the values of foo and bar to be persisted across
launches, so it makes sense for them to be prefs. That makes me
think that I could bind the checkboxes to the
NSShareduserDefaultsController, but my app needs to take action
when those change.
Maybe the best way is to implement the setters/getters for foo and
bar, and within those, set and get the user defaults. But as I
think about it, it seems that one would never directly bind UI to
NSShareduserDefaultsController.
Am I missing something?
TIA,
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
@me.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden