Re: Can I make custom pasteboard type for an object reference?
Re: Can I make custom pasteboard type for an object reference?
- Subject: Re: Can I make custom pasteboard type for an object reference?
- From: Michael Ash <email@hidden>
- Date: Thu, 15 Oct 2009 12:17:43 -0400
On Wed, Oct 14, 2009 at 8:21 PM, Rick Mann <email@hidden> 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 (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