• 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: NSObjectController needless in "Intro to Bindings"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSObjectController needless in "Intro to Bindings"?


  • Subject: Re: NSObjectController needless in "Intro to Bindings"?
  • From: Jochen Moeller <email@hidden>
  • Date: Thu, 5 Jun 2008 00:09:10 +0200

Thanks a lot for your explanation :-)

Cheers,
Jochen


Am 04.06.2008 um 11:21 schrieb Ken Thomases:

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


References: 
 >NSObjectController needless in "Intro to Bindings"? (From: Jochen Moeller <email@hidden>)
 >Re: NSObjectController needless in "Intro to Bindings"? (From: Ken Thomases <email@hidden>)
 >Re: NSObjectController needless in "Intro to Bindings"? (From: Jochen Moeller <email@hidden>)
 >Re: NSObjectController needless in "Intro to Bindings"? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: 10.5 Only: If I say NO, NSOutlineView ignores cmd key, does its own thing
  • Next by Date: Re: invoking quicklook via code
  • Previous by thread: Re: NSObjectController needless in "Intro to Bindings"?
  • Next by thread: set up multiple columns in NSTableView
  • Index(es):
    • Date
    • Thread