• 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: Can I make custom pasteboard type for an object reference?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I make custom pasteboard type for an object reference?


  • Subject: Re: Can I make custom pasteboard type for an object reference?
  • From: Michael Ash <email@hidden>
  • Date: Thu, 15 Oct 2009 12:17:43 -0400

On Wed, Oct 14, 2009 at 8:21 PM, Rick Mann <email@hidden> wrote:
> I'm trying to implement a library like Interface Builder's. When the user
> drags an item out of the library and onto one of my custom views, it should
> instantiate an object and place it in the view accordingly.
>
> I'm trying to implement the drag by writing to the pasteboard an NSData
> object I create that contains a reference to the object, like so:

Skip the pasteboard. NSDraggingInfo has a -draggingSource method. This
will return the source object that you passed in to the drag method
when you initiated it. Just have the source implement some sort of
-draggedObjects method, and then you can query it directly.

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: 
 >Can I make custom pasteboard type for an object reference? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Code Sign verification on Leopard
  • Next by Date: Re: Mixed font sizes in a UILabel?
  • Previous by thread: Re: Can I make custom pasteboard type for an object reference?
  • Next by thread: shared preferences.
  • Index(es):
    • Date
    • Thread