Re: Encode a 'Class' type using NSValue
Re: Encode a 'Class' type using NSValue
- Subject: Re: Encode a 'Class' type using NSValue
- From: Michael Ash <email@hidden>
- Date: Fri, 14 May 2010 16:35:47 -0400
On Fri, May 14, 2010 at 5:45 AM, Billy Flatman <email@hidden> wrote:
> Hi Quincey,
>
> Thanks for you help. I am trying to pass the class reference around for drag and drop, I think i'll try your idea of converting the pointer to a number,
The best way to pass arbitrary pointers around your app for drag and
drop is to add a method to retrieve that pointer to your dragging
source, then the destination can use [[draggingInfo draggingSource]
retrieveWhateverInfo] to get it. This avoids all of this scary
pasteboard manipulation, and ensures that inter-process drags don't
explode because the pointer went invalid.
Mike
_______________________________________________
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