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

NSObjectController needless in "Intro to Bindings"?


  • Subject: NSObjectController needless in "Intro to Bindings"?
  • From: Jochen Moeller <email@hidden>
  • Date: Wed, 4 Jun 2008 01:25:57 +0200

Greetings!

Here my 1st question to this list :-)

I started with Bindings and worked through the great article
"Introduction to Cocoa Bindings" by Scott Stevenson.
<http://cocoadevcentral.com/articles/000080.php>

All works fine as expected even when I delete the NSObjectController "ControllerAlias" and change the Binding of the NSArrayController "Mailboxes".

Here are the details:
Two Model classes: Email and Mailbox.
A custom controller: MyController with ivar (NSMutableArray) and accessor "mailboxes".


Original Bindings:
NSObjectController "ControllerAlias":
  content-Outlet is set to MyController instance
NSArrayController "Mailboxes":
  Bind to: ControllerAlias
  Controller Key: selection
  Model Key Path: mailboxes
  Object Class Name: Mailbox

My Bindings:
NSObjectController "ControllerAlias": deleted
NSArrayController "Mailboxes":
  Bind to: MyController
  Controller Key: -
  Model Key Path: mailboxes
  Object Class Name: Mailbox

Both versions run identical, so my question:
Are both approaches equivalent and the NSObjectController is not really needed or is there a reason/advantage to hook the NSObjectController between MyController and the NSArrayController ?


Thanks
Jochen Moeller

_______________________________________________

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


  • Follow-Ups:
    • Re: NSObjectController needless in "Intro to Bindings"?
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Apple Remote and exclusivity
  • Next by Date: set up multiple columns in NSTableView
  • Previous by thread: Re: Frame rate check
  • Next by thread: Re: NSObjectController needless in "Intro to Bindings"?
  • Index(es):
    • Date
    • Thread