Re: NSObjectController needless in "Intro to Bindings"?
Re: NSObjectController needless in "Intro to Bindings"?
- Subject: Re: NSObjectController needless in "Intro to Bindings"?
- From: Ken Thomases <email@hidden>
- Date: Wed, 4 Jun 2008 04:21:34 -0500
On Jun 4, 2008, at 3:18 AM, Jochen Moeller wrote:
I already read this link and thought that the NSArrayController
"Mailbox" represents this intervening NSController between the model
object and the table view because the table view is not bound direct
to the model or a custom controller. To reformulate my question -
Why is a second intervening NSController in form of an
NSObjectController useful?
I believe (although I'm not certain) that it allows a single place to
send the -commitEditing message to commit the editing of all relevant
views, chained through the array controllers. Without that single
object controller, you'd have to send -commitEditing to each of the
array controllers separately.
Also, there's no downside to using the NSObjectController. It may
have just been the author's habit. It might be considered future-
proofing.
As you note, it's not strictly necessary in that example.
Regards,
Ken
_______________________________________________
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