0
votes

I'm writing a Cocoa Application (XCode 7.0.1) and within it, I have a NSTableView and a NSView. The application is designed in a why that we can drag and drop items from the NSTableView into the NSView.

The drag and drop works properly, but I can only register that something is dropped on the NSView and not where in the NSView. I was wondering if there is a way to get the location of the drop within the frame of NSView?

I have tried all mouse events that NSView can have but they don't seem to be called during the drag operation.

To be more precise, I use

  • (NSDragOperation)draggingEntered:(id )sender;

and

  • (BOOL)performDragOperation:(id )sender;

To receive the drag operation with NSView.

1
Hey.. I am tring to make same like you made.. Drag Items from NSTableView to NSView... Can you guide me for this?Malav Soni

1 Answers

1
votes

sender conforms to the NSDraggingInfo protocol and implements -(NSPoint)draggingLocation. [sender draggingLocation] returns the current location of the mouse pointer in the base coordinate system of the destination object’s window.