• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Dragging NSManagedObject subclass within app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Dragging NSManagedObject subclass within app
      • From: Graham Cox <email@hidden>
    • Re: Dragging NSManagedObject subclass within app
      • From: Rick Mann <email@hidden>
  • Prev by Date: Re: Dragging from NSCollectionView in inactive window?
  • Next by Date: Re: Dragging NSManagedObject subclass within app
  • Previous by thread: Re: Dragging from NSCollectionView in inactive window?
  • Next by thread: Re: Dragging NSManagedObject subclass within app
  • Index(es):
    • Date
    • Thread