Re: What exactly does NSController do?
Re: What exactly does NSController do?
- Subject: Re: What exactly does NSController do?
- From: Quincey Morris <email@hidden>
- Date: Sat, 21 Nov 2009 12:03:28 -0800
On Nov 20, 2009, at 14:02, Chase Meadors wrote:
> Thought I'd give the question another try. Any insight appreciated.
A while back, I wondered about the same thing, and found two things, both relatively minor:
1. NSObjectController responds to 'commitEditing:' by committing all the "editors" that are bound to it. As we've been discussing in another thread, it's a convenience to be able to commit pending changes in the UI just by sending 'commitEditing:' to a couple of NSController-subclass objects.
2. Leopard had a small bug in text field undo (well, redo, actually) that didn't show up if you connected the text field to a NSObjectController instead of directly to File's Owner. I have no idea if this is fixed in Snow Leopard.
You could also add a general:
3. Using NSObjectController makes in-NIB bindings consistent. NSObjectController and (say) NSArrayController have common methods (such as 'selection') that have a trivial implementation in NSObjectController.
and a possible:
4. Using NSController options like 'Prepares content automatically' may be useful to avoid glue code, in relatively simple cases where the option does exactly what you want.
_______________________________________________
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