Simple setup:

I've got an NSTableView that allows items to be dragged to an NSView subclass.

In the view I'm checking the drag operation via NSDraggingInfo's method draggingSourceOperationMask.

Drops received there have a NSDragOperation of -1. Drags started from the view have expected drag operations (move, copy, depending on the circumstances). But drags from the table view are totally screwed up. Any idea what's going on there..?

Anything I can do from - (void)tableView:(NSTableView *)tableView draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint forRowIndexes:(NSIndexSet *)rowIndexes ?

Any hints much appreciated.

有帮助吗?

解决方案

D'oh!!

Forgot to call setDraggingSourceOperationMask:forLocal: on the NSTableView to configure it.
('Sets the default operation mask returned by draggingSourceOperationMaskForLocal: to mask.')

Alas, hope that'll help some other poor soul to save some time when googling the hive mind..

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top