On Sat, Jul 19, 2008 at 9:44 AM, Cathy Shive <[EMAIL PROTECTED]> wrote:
[> Hamish wrote:] >> 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. The app I'm currently developing is my first foray into NSViewControllers and I haven't done anything particularly complex, so take this with a pinch of salt. But for all the same reasons I would want to separate views into multiple nibs, I would want to separate controllers too. The design of my view hierarchy is subsequently informed by this consideration. So for what you describe, I would make the detail view a child of the master table view, rather than making them both children of some other view. This makes particular sense in my current development, where detail views change according to the selection in master views. But it would also feel strange to me to separate the table view from its array controller to such an extent as putting them in separate nibs. Maybe further experience will change my mind about this, though. As a workaround for what Ivy describes, I would try using an extra array controller serving as a proxy, with its contentObject bound to representedObject.self. (Whether it would fail, just like NSTableView, if not bound directly to an NSArrayController, I do not know.) Hamish _______________________________________________ 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]