NSTableView always selects the first row when starting the application

This may seem like an easy problem, but I honestly can't figure out how to solve it. Whenever I run the application, the first line of my NSTableView always selected. I want the default behavior in the table view not to be selected rows. How can I accomplish this in part of the Xcode4 Builder interface?

+4
source share
5 answers

If you are using NSArrayController to provide content for an NSTableView , make sure the Avoid Empty Selection property is not checked for the array controller.

Otherwise, what version of OS X do you see in?

+6
source

In the properties tab of the NSTableView interface NSTableView , select the Empty Selection check box.

+7
source

What about calling [tableview deselectAll] on awakeFromNib ?

+1
source

Another reason that can lead to the fact that the first line will always be selected:
If you use bindings to populate the table, make sure the "Avoid empty selection" option is not checked in your NSArrayController.

+1
source

In Xcode 5 on Mavericks, this works for me:

uncheck the "Select inserted objects" check box of the array controller.

Thanks for the tips provided on this page!

+1
source

All Articles