0

When right clicking on a cell view in a view based table view with an assigned menu the cell's row gets a blue outline and the context menu appears. How do I get the index of that row? The property clickedRow only works for cell based table views.

Note: my question is significantly different in that I need a solution for menu updates es explained previously:

I need the clicked row in the menuNeedsUpdate function when creating the new menu.

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
  • Possible duplicate of [NSTableView Right Clicked Row Index](http://stackoverflow.com/questions/12494489/nstableview-right-clicked-row-index) – eonil May 25 '16 at 11:10

1 Answers1

0

It appears that clickedRow indeed also works for view based table views, but it's not yet set in menuNeedsUpdate. So it cannot be used to adjust the items in the menu (e.g. show specific items only that apply to the clicked row). However, you can use the menu validation to enable/disable entries (there the clicked row value is set finally).

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181