Re: struggling with binding, NSOutlineView, and NSTableView
Re: struggling with binding, NSOutlineView, and NSTableView
- Subject: Re: struggling with binding, NSOutlineView, and NSTableView
- From: Kyle Sluder <email@hidden>
- Date: Wed, 13 May 2009 18:15:28 -0400
On Wed, May 13, 2009 at 5:31 PM, David Owens <email@hidden> wrote:
> I attached a sample project that repros the issue that I'm seeing. It is
> nearly the same as to what I have in my real app.
You don't have a breakpoint on objc_exception_throw. That would make
it more obvious that something was going on, since you also didn't see
this showing up in the console window:
2009-05-13 18:00:59.459 OutlineView[694:813] ***
-[_NSControllerObjectProxy fullPath]: unrecognized selector sent to
instance 0x155890
The line that's causing the exception is in your outline view data
source's -outlineView:objectValueForTableColumn:byItem:
implementation:
return (item == nil) ? [[groups selection] fullPath] : (id)[item relativePath];
Specifically, your use of [groups selection] is the problem.
-selection is documented to return a KVC-compliant proxy object, not
actual instances of your model objects. For that, you want
-selectedObjects.
--Kyle Sluder
_______________________________________________
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