Re: Modernising dragging problem
Re: Modernising dragging problem
- Subject: Re: Modernising dragging problem
- From: Markus Spoettl <email@hidden>
- Date: Sat, 31 Jan 2015 19:23:03 +0100
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 (email@hidden)
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:
This email sent to email@hidden