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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to