Question

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.

Was it helpful?

Solution

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..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top