views:

143

answers:

1

I have an NSOutlineView bound to a NSTreeController and a CoreData Datamodel. NSOutlineView displays his data properly.

A NSTableView's cell values bound to a NSArrayController, displaying data from CoreData. NSTableview displays his data properly too.

The Datamodel has a relationship between data for NSOutlineView and NSTableView

When I try to bind NSArrayController's "Content set" to NSTreeController.selection.name to display all items related to the NSOutlineView selection I get this error:

Cannot create NSSet from object Untitled of class NSCFString (Where "Untitled" is the value of NSOutlineViews node)

And no data in NSTableView is displayed.

Everything setup in IB - does anyone has a hint for me to get this working?

Thanks a lot!

+1  A: 

You want to bind the NSArrayController's Content Set to NSTreeController, it's Controller Key to "selection" and then the Model Key Path should be the relationship name, which I would hope isn't "name". Then in the TableView you bind the column(s)'s value to the NSArrayController, with Controller Key being "arrangedObjects" and Model Key Path the property "name"

ctshryock
I did it this way but I figured out that I simply messed up the data model relationships.
Boris