Aarhus88
Aarhus88

Reputation: 161

Detect when user clicks on NSTableView

I have two NSTableView objects on a sheet in OS X. I need to be able to detect when the user clicks on a row in one of the tables, even if it does not trigger a tableViewSelectionDidChange notification (i.e. the user clicks on the row that is already selected). So I suppose I want to know when the table becomes first responder, but I am not sure if that is the solution, nor how to do it.

How can I do this in either Swift or Obj-C?

Upvotes: 1

Views: 210

Answers (1)

Aarhus88
Aarhus88

Reputation: 161

Never mind, this is accomplished simply by having an @IBAction for the NSTableView, which tells me whenever the table is clicked or the highlight changes to a different row. This is all I needed -- false alarm.

Upvotes: 1

Related Questions