Reputation: 23722
I have two NSTableViews populated with Core Data that are linked using bindings. When a row is selected in NSTableView1, NSTableView2 is populated and the first row in it is selected. I have registered the NSArrayController that corresponds to NSTableView2 with KVO on its selectionIndex. This is so that when a row is selected in NSTableView2 a method is run. My problem is that when a row is selected in NSTableView1 then the first row in NSTableView2 is selected triggering the method. I would like it so that I can select a row in NSTableView1 and populate NSTableView2 without having a row automatically selected in NSTableView2. How is this accomplished?
Upvotes: 1
Views: 1475
Reputation: 1305
This solution worked for me Xcode 8.3.3.
I have clicked the Empty checkbox:
Upvotes: 0
Reputation:
That you are using Core Data is unimportant here. This is strictly a bindings issue.
Turn off "Avoids empty selection" on your array controller.
Upvotes: 8