Re: Dragging NSManagedObject subclass within app
Re: Dragging NSManagedObject subclass within app
- Subject: Re: Dragging NSManagedObject subclass within app
- From: Rick Mann <email@hidden>
- Date: Sun, 10 Mar 2013 19:30:45 -0700
On Mar 10, 2013, at 17:53 , Rick Mann <email@hidden> wrote:
> I'm trying to drag from one view in my app to another. The object being dragged is an NSManagedObject that lives in one NSManagedObjectContext, and the drag destination will instantiate a new NSManagedObject in a new NSManagedObjectContext (which is not even in the same persistent store), and copy the attributes.
>
> I just want the drag destination to be handed the actual object. All the examples I can find online show the use of NSKeyedArchiver to put either the custom object or the -[NSManagedObjectID URIRepresentation] onto the pasteboard; I don't really want to do this (and for now, I don't care to support dragging out of my app; in the future, I might allow this, creating a new file containing the object or a textual representation or whatnot).
>
> Is it possible to just pass a pointer to the object to the drag destination?
>
> FYI, the drag source is an NSCollectionView.
Well, I feel foolish. I keep asking questions I asked aeons ago and never implemented.
My conclusion is that intra-app dragging sucks.
--
Rick
_______________________________________________
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