views:

94

answers:

1

I'll preface with "Brand new to Cocoa" -- I have a master/detail page on my app: Students that may have one or several contacts (i.e. parents, relatives, etc). I have a Student entity and a Contact entity with a relationship field called "contact" in the Student entity and another relationship field called "student" in the Contact entity. The view has a TableView for the students and a TableView for the contacts with add and delete buttons to add a contact for the student that's highlighted in the table. There are NSArrayController objects called Students and Contacts to manage the entities. Students is bound to the File Owner (the NSDocument) ManagedObjectContext and the student name shows up fine in that TableView. The Contacts array controller Content Set is bound to Students.Selection.Contact (a relationship field in the Students entity.

The Add button is connected to the add: method in the Contacts array controller and the Delete button is bound to the remove: method in the Contact array controller. Clicking the Add button doesn't do anything -- and no errors on the log, so I'm not sure where the connection is missing. Any ideas?

A: 

I figured it out -- there was a binding missing :)

Roger Jaffe