Forum Xamarin.Mac

How to enable Edit->Copy in an NSTableView

GeoffHartGeoffHart Member

This seems like it should be simple enough, but I can't figure it out.

As far as I can tell from the Cocoa forums, the idea is you subclass the NSTableView and implement the copy: selector, and that should work? Based on that, it seems to me this code should work - I can select the MyTableView as the Class in Xcode, so I seem to have subclassed it properly, but I still can't select copy from the edit menu.

Is there some other way I'm supposed to be doing this?

[Register("MyTableView")]
public class MyTableView : NSTableView
{
...
[Action("copy:")]
public void Copy(NSObject sender)
{

    }

}

Tagged:
Sign In or Register to comment.