Reputation: 693
I have several NSTableViews in different NSViewControllers. In my main application window I have a menu which has Edit->Copy command. This command is always disabled, so when I select a row or column in any of my NSTableViews, I can't use it.
Can anyone tell me how to enable the COPY menu item?
I have found this answer here but it didn't help. In all my NSTableViews,all text cells have the checkbox RefusesFirstResponder unhecked.
Also, just to mention that I have some custom menu items in the menu which works like a charm.
Upvotes: 3
Views: 1243
Reputation: 15589
The copy command will be enabled if an object in the responder chain responds to the copy:
message. The solution is to implement the copy:
method in a controller which is in the responder chain like the viewcontroller or the windowcontroller.
Upvotes: 5