On Aug 9, 2011, at 8:43 PM, Izak van Langevelde wrote:

> Now I want to allow drag and drop from one document to another, and my first 
> guess was to write the row data to the pasteboard.
> What puzzles me, is how to delete the row data from the source data, in case 
> of a move. That is, my acceptDrop inserts the row data into the destination 
> data source, but the indexes of the source rows are not available at this 
> point.

And also consider that the destination of the drag could be a different app, in 
which case you don’t get an -acceptDrop: call at all.

Instead, to handle the source end of a move (or delete, i.e. drag to Trash) you 
need to implement the NSDraggingSource protocol’s 
-draggedImage:endedAt:operation: method. If the operation was a move or delete, 
you should delete the dragged items.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to