• 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
Re: Encode a 'Class' type using NSValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Encode a 'Class' type using NSValue (From: Billy Flatman <email@hidden>)
 >Re: Encode a 'Class' type using NSValue (From: Quincey Morris <email@hidden>)
 >Re: Encode a 'Class' type using NSValue (From: Billy Flatman <email@hidden>)

  • Prev by Date: Re: [[NSFileManager alloc] init] considered thread-safe
  • Next by Date: Re: TUTORIAL: Generating Unique ID Strings
  • Previous by thread: Re: Encode a 'Class' type using NSValue
  • Next by thread: TUTORIAL: Generating Unique ID Strings
  • Index(es):
    • Date
    • Thread