• 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: NSViewController Binding Problem continued
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSViewController Binding Problem continued


  • Subject: Re: NSViewController Binding Problem continued
  • From: Cathy Shive <email@hidden>
  • Date: Sat, 19 Jul 2008 10:44:24 +0200


I haven't yet come across a situation in which it would be desirable
for an NSTableView and its associated NSArrayController to be in
separate nibs. I guess Apple haven't, either ;)


Actually, I would think that it's quite common in apps that use NSViewController. Imagine a view managed by one view controller displaying a list of items in a table view. Then another view, managed by another view controller, displays details about the selected object using several text fields and maybe you can edit the selected object's attributes with sliders and pop up buttons.


I'd want to use the same array controller as the "data source" for the views in the different nib files, so I'd keep it somewhere central, like the document or the window controller (in a non-doc based app) . I'd give the view controllers access to the array controller by setting their representedObject to either the array controller itself or the document/window controller that's keeping the array controller.

Am I thinking about this in the wrong way?

I guess that it would be nice if IB would let you bind directly to
representedObject when the File's Owner's class is set to an
NSViewController so that when the nib is loaded, the table view gets what it
wants.

Seems like a bit of a special case to me to circumvent something that Apple could just fix properly! Mind you, it might be nice not to have to type "representedObject." in front of every binding in a view nib...

Yeah, that's not a bad side effect :)

Cathy

_______________________________________________

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: NSViewController Binding Problem continued
      • From: "Hamish Allan" <email@hidden>
References: 
 >NSViewController Binding Problem continued (From: Ivy Feraco <email@hidden>)
 >Re: NSViewController Binding Problem continued (From: Ron Lue-Sang <email@hidden>)
 >Re: NSViewController Binding Problem continued (From: "Hamish Allan" <email@hidden>)
 >Re: NSViewController Binding Problem continued (From: Cathy Shive <email@hidden>)
 >Re: NSViewController Binding Problem continued (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: SOLVED: CoreData Property access compiles, but fails at runtime
  • Next by Date: setting image for person in address book
  • Previous by thread: Re: NSViewController Binding Problem continued
  • Next by thread: Re: NSViewController Binding Problem continued
  • Index(es):
    • Date
    • Thread