On Fri, Jul 18, 2008 at 11:18 PM, Cathy Shive <[EMAIL PROTECTED]> wrote:
> I wonder if it would actually make a difference in this case. Since the nib > doesn't get loaded until the 'load view' method is called Nor it does. > and she's setting > the rO directly after the initializer (before requesting the view), the > result would be the same, right? Indeed. In the face of that, it's not clear to me why the tableview doesn't know that the representedObject is an arrayController, given that the bindings can't have been set up until after the nib is loaded. > Either way, the object you're binding to > is the view controller and not the array controller that the NSTableView > requires. I'd definitely call that requirement a bug. >> Or you could argue that, according to the principles of duck typing, >> NSTableView shouldn't care, just as long as >> representedObject.arrangedObjects.displayText quacks like an array. In >> which case it's a bug. > > Seems like this is the real issue ;) > > I'm really curious to find a solution to this, too - one that doesn't > involve adding another array controller to the app or moving the bindings > setup to code. Going to code isn't too bad, tho... 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 ;) > 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... 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]