On 31/01/15 00:15, Graham Cox wrote:
I'm updating some older code that uses the now-deprecated [NSView
dragImage:at:offset:pasteboard:source:slideback:] to use NSDraggingSession
and pals. Note that this older code works just fine, I've never had any
issues with it. I'm doing this mostly just to clear out compiler warnings,
though my instinct tells me not to "fix" code that isn't broken.

Sadly its replacement is broken.

I did the same conversion a while back and have had no such issue. I found it completely straight forward and surprisingly painless. Are you sure you're implementing all the required protocols?

+ In the view starting dragging NSDraggingDestination (if it wants to receive something, too), also are you calling -registeringForDraggedTypes: in that view
+ In you object you're calling "obj" NSPasteboardWriting
+ In the object you're calling "source" NSDraggingSource

In my implementation "obj" and "source" are the same object, but that should not matter. Looking at my code, I think that's all the needs to be done.

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to