Dragging NSManagedObject subclass within app
Dragging NSManagedObject subclass within app
- Subject: Dragging NSManagedObject subclass within app
- From: Rick Mann <email@hidden>
- Date: Sun, 10 Mar 2013 17:53:36 -0700
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.
Thanks!
--
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