Forum Xamarin.Mac

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How to enable Edit->Copy in an NSTableView

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.