I've got an application that uses bindings to manage a list of objects via NSArrayController.
I want to implement an inspector window that shows the details of the selected object in a list. My list displays the object name property with a status.
The inspector window is in a separate nib file.
Within the -(void)awakeFromNib method of the inspector window controller object I programatically create the binding between the NSArrayController.selection in my main document window and the interface elements in the inspector window using the bind:toObject:withKeyPath:options: method. i.e.
[nameText bind:@"value" toObject:parentController withKeyPath:@"selection.objectName" options:nil];
When the inspector window displays the first time, behavior is as expected, i.e. I can edit the name in the inspector and have it update the Master listing and underlying model object correctly.
However, if I select another name on the list in the master window, the inspector does not update. It doesn't work if I close the inspector and re-open with a different item selected either.
Any suggestions on alternative approaches would be appreciated.
-Chip Coons |