What I am looking to do is set the background color of the selected row in an NSTableView when a I button is clicked.
I've seen other cases where people have used tableView:willDisplayCell:forTableColumn:row:
and setBackgroundColor:
but I don't think that will work in my situation where I want it to happen when a button is clicked.
I know that I can find the selected row with NSTableView's selectedRow
method and set the Background color for a cell with setBackgroundColor:
, but what I don't know how to do is get from a NSInteger for the selected row to an NSCell to set the background color of.