Search code examples
cocoabindingnstableviewnsarraycontroller

How to bind the selection of the NSTableView to the NSArrayController


I just want to be able to use the the methods of the nsarraycontroller called remove: and add:


Solution

    1. Select the NSTableView. If the inspector window's title shows Scroll View, you need to click the table view again to select it.
    2. In the bindings tab, connect the Selection Indexes binding to the Array Controller's selectionIndexes controller key. This is similar to binding the content to the array controller, except that you don't use the arrangedObjects key.