0
votes

I've got two NSTableView in a single NSViewController, and each has their own NSArrayController to handle what exists. I'm now trying to wire up the Edit->Delete button. How do I know, when the delete method is called, 'who' sent that message?

Specifically I want to know whether I was clicked into the first table view or the second one when I then chose the Delete menu item. The 'sender' to the delete method is just the NSMenuItem so I can't back-track that to the table.

1
Usually you'd hook up the delete button to the NSArrayController.Gerd K
Can you give a little more specifics on how that's done please? Since I have two array controllers, I'm not sure how to link things. This is my first Cocoa app...I normally do iOS.Gargoyle

1 Answers

0
votes

Get firstResponder of the window and follow nextResponder until you find a table view.