I'm trying to create a simple interface to my core data model in the style of iTunes Genre browser.
I have a model setup with three entities: Genre <-->> Artist <-->> Album
.
I'd like to simply tie them each to a NSTableView, but it appears as though accessing children relationships from a NSArrayController is not KVC compliant. So, I'm having difficulty communicating the selected Genre objects to the ArtistController.
How do you do this? Is it even possible within IB without any custom subclassing?
Edit for Posterity: I was doing several things wrong.
- The child controller needs to know about the managedObjectContext through its own binding.
- The child controller must not be in
Entity
Mode, but rather operate as aNSMutableDictionary
class. - And, finally, the child controller does not prepare its data. It retrieves it from the parent, through the
Content Set
binding. Use the controller keyselection
, and the model key path that connects to the children.
phew. Both Brian's answer and this MacResearch tutorial were helpful in determining my errors (and which parts I had right).