• 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: Pasteboard question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pasteboard question


  • Subject: Re: Pasteboard question
  • From: Graham Cox <email@hidden>
  • Date: Sat, 24 May 2008 14:14:07 +1000


On 24 May 2008, at 6:36 am, Davide Scheriani wrote:

[pboard declareTypes:[NSArray arrayWithObject:NSGeneralPboard] owner:self];



Wow. That's possibly one of the weirdest bits of code I've seen for a while :)


Do read this:

http://developer.apple.com/documentation/Cocoa/Conceptual/CopyandPaste/index.html

and this:

http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/index.html

The above should be something like:

NSPasteboard* pb = [NSPasteboard generalPastebord];

[pb declareTypes:[self myListOfPasteboardTypes] owner:self];



But actually for drag and drop of rows in a table view, or dragging data into or from a table view, you don't use the general pasteboard anyway, but the dragging pasteboard. To do this you need to register your table view to receive the dragging types you want, then implement the NSDraggingDestination (and to drag from, the NSDraggingSource) protocol. The docs linked above should tell you what you need to know. Throw away the code you posted, it's too far gone.

hth,

G.
_______________________________________________

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: 
 >Pasteboard question (From: Davide Scheriani <email@hidden>)

  • Prev by Date: NSArray for (... in ...)
  • Next by Date: Re: NSArray for (... in ...)
  • Previous by thread: Re: Pasteboard question
  • Next by thread: Cover Flow in Cocoa?
  • Index(es):
    • Date
    • Thread