CoreData - placing "references" to objects on the general pasteboard
CoreData - placing "references" to objects on the general pasteboard
- Subject: CoreData - placing "references" to objects on the general pasteboard
- From: Jim Correia <email@hidden>
- Date: Tue, 9 May 2006 11:05:57 -0400
The CoreData documentation says
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
Articles/cdUsingMOs.html
You can perform drag and drop operations with managed objects—such
as, for example, transferring an object from one relationship to
another—using a URI representation. You can get a URI representation
of a managed object using the object's object ID:
NSURL *moURI = [[managedObject objectID] URIRepresentation];
That technique works great for drag and drop, since there is no [mod
save: &error] between populating the pasteboard and receiving the
drop to invalidate any temporary object IDs.
This problem does surface if I want to put object references on the
general pasteboard. (I really do want a reference here, not a
dictionary of attributes, so that the paste location can decide what
to do given the reference to the original.)
Is there a recommended solution to this problem? (If not, I can
arrange for the pasteboard rep to be a unique attribute of the
objects in question, and fetch them at paste time.)
Jim _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden