On Wed, Oct 14, 2009 at 8:21 PM, Rick Mann <rm...@latencyzero.com> wrote:
> I'm trying to implement a library like Interface Builder's. When the user
> drags an item out of the library and onto one of my custom views, it should
> instantiate an object and place it in the view accordingly.
>
> I'm trying to implement the drag by writing to the pasteboard an NSData
> object I create that contains a reference to the object, like so:

Skip the pasteboard. NSDraggingInfo has a -draggingSource method. This
will return the source object that you passed in to the drag method
when you initiated it. Just have the source implement some sort of
-draggedObjects method, and then you can query it directly.

Mike
_______________________________________________

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