Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSTableView Right Clicked Row Index

I'm looking for a way to get right-clicked row index from NSTableView but I can't find any delegate methods or class attributes for it. Any suggestion is appreciated.

like image 276
Abcd Efg Avatar asked Sep 19 '12 12:09

Abcd Efg


1 Answers

Use the NSTableView method - (NSInteger)clickedRow to get the index of the last clicked row. The returned NSInteger will be the index of the right clicked row.

You do not need to subclass NSTableView for this solution. clickedRow is also available on NSOutlineView.

like image 144
Graham Miln Avatar answered Oct 11 '22 05:10

Graham Miln