The source implements -draggingSourceOperationMaskForLocal: and - mouseDown: (for initiating the drag).

The destination implements -draggingEntered:, - prepareForDragOperation:, and -performDragOperation:.

I checked the pasteboard's types list, and the result is as expected. For reference, here's how I start the drag:

NSPasteboard * pboard = [NSPasteboard pasteboardWithName: NSDragPboard];
[pboard declareTypes: [NSArray arrayWithObject: MyPasteboardType] owner: nil];
if ([pboard setData: dragData forType: MyPasteboardType])
[self dragImage: dragImage at: dragLoc offset: NSZeroSize event: event pasteboard: pboard source: self slideBack: YES];

-Michael

On May 5, 2008, at 4:25 PM, Stéphane Sudre wrote:


On May 5, 2008, at 11:02 PM, Michael Gardner wrote:
I'm trying to implement drag & drop in an NSView subclass. I made sure that the source returns NSDragOperationMove in - draggingSourceOperationMaskForLocal:, and that the destination calls -registerForDraggedTypes: with the same (custom) type that the source uses for the drag operation.

The drag operation starts properly, but the destination's - draggingEntered: method never gets called, no matter what I do. What could cause this? Does it matter if the source and destination are the same object?

What methods did you implement in your view for drag& drop?

Did you log the content of the pasteboard after the drag is initiated?



_______________________________________________

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/gardnermj%40gmail.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to