In my app I have an NSOutlineView. I have contextual menus
relating to the overall table, but also relating to an individual
item row. I notice that when I right-click on a row, I get a
special highlight (blue outline) independent of the selected row.
How can I find out what row that was when the menu item's action
is called? I need to handle the menu differently depending on
whether a specific row was right-clicked or just the general table.
I don't know if this made the general docs, but this is discussed
in the AppKit release notes for Leopard.
The relevant section is titled "NSTableView/NSOutlineView -
Contextual menu support".
Jim
Thanks Jim, just what I needed (in a nutshell, -clickedRow:)
Also look at the DragNDropOutlineView example that shows how to do
this. If -clickedRow is in the -selectedRowIndexes, then you should
apply your context to all selectedRows.