Re: Dragging NSManagedObject subclass within app
Re: Dragging NSManagedObject subclass within app
- Subject: Re: Dragging NSManagedObject subclass within app
- From: Graham Cox <email@hidden>
- Date: Mon, 11 Mar 2013 14:16:25 +1100
On 11/03/2013, at 11:53 AM, Rick Mann <email@hidden> wrote:
> Is it possible to just pass a pointer to the object to the drag destination?
Yes, just store the pointer somewhere that the source and destination can both access it. You don't even need the pasteboard, except perhaps to put a dummy item on it (I often use an empty string) to keep the drag manager happy. Also use the NSDragOperationPrivate operation mask to stop anyone else trying to interpret your drag.
> My conclusion is that intra-app dragging sucks.
Well, if you over-think the problem, then it can. But intra-app dragging is FAR simpler than extra-app dragging, since the pasteboard doesn't need to come into it.
--Graham
_______________________________________________
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