views:

65

answers:

0

I've got a pretty standard setup: an NSArrayController whose contents are displayed in an NSCollectionView, and a pane of editable views bound to the array controller's selection (which is of course controlled by the collection view).

For some reason, when I bind an NSObjectController's contentObject to the array controller's selection, and then bind my editing stuff to the object controller, everything stops updating and becomes disabled (assumedly thanks to conditionallySetsEditable). If I bind my editing stuff straight to the array controller's selection, everything works fine.

First of all, what am I doing wrong? Secondly, should I even be using an object controller in this situation? The Cocoa Bindings Reference suggests that I should always bind through a controller, but I've also seen examples from Apple (like "Combatants" in that same document (!)) which bind directly to an array controller's selection, with no object controller.

Which way is best? And why won't one of them work for me?