Re: When am I no longer the pasteboard owner?
Re: When am I no longer the pasteboard owner?
- Subject: Re: When am I no longer the pasteboard owner?
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 10 May 2006 17:37:01 -0700
On May 10, 2006, at 2:12 PM, Jim Correia wrote:
When the user copies an object in my application, I am placing the
native type on the pasteboard right away (the URI rep for the
managed object) and declaring all the types that the object can be
converted to (string and attributed string, for the sake of argument).
The documentation points out that the pasteboard owner must be a
long lived object, so I allocate a helper, and make that the owner
(and tell it which managed object context to use to do the
conversions).
The problem is, when can I release this helper object? -
pasteboardChangedOwner: appears to only be sent in the case that
the owner is changing, and the I haven't gotten a -
pasteboard:profideDataForType: for one or more of the types that I
declared or added.
Do I have to do the book keeping which the previous paragraph
suggests? Or have I missed an obvious, simpler solution.
The owner of the pasteboard has to exist as long as there's a
possibility of something asking for the pasteboard contents. You
can't count on -pasteboard:provideDataForType: only being sent once.
-jcr
"This is not a book to be tossed aside lightly. Rather, it should be
hurled with great force." -Dorothy Parker
_______________________________________________
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