I am implementing NSTableView row drag and drop. I am working with the examples here Drag & Drop Reorder Rows on NSTableView.
It's actually going fairly well in that my data source methods are getting called when I drag a row in my table. However I am having trouble using the NSDraggingInfo.EnumerateDraggingItems method from Xamarin.
The example Swift code is:
info.enumerateDraggingItemsWithOptions([], forView: tableView, classes: [NSPasteboardItem.self], searchOptions: [:]) {
if let str = ($0.0.item as! NSPasteboardItem).stringForType("public.data"), index = Int(str) {
oldIndexes.append(index)
}
}
The bit I'm having trouble with is classes: [NSPasteboardItem.self]
.
The signatures of the Xamarin method are:
EnumerateDraggingItems(NSDraggingItemEnumerationOptions, NSView, NSPasteboardReading[], NSDictionary, NSDraggingEnumerator)
EnumerateDraggingItems(NSDraggingItemEnumerationOptions, NSView, NSArray, NSDictionary, NSDraggingEnumerator)
EnumerateDraggingItems(NSDraggingItemEnumerationOptions, NSView, IntPtr, NSDictionary, NSDraggingEnumerator)
How do I supply the required argument for the classes
parameter?