• 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
Copy-dragging in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Copy-dragging in an NSTableView


  • Subject: Copy-dragging in an NSTableView
  • From: Andrew Merenbach <email@hidden>
  • Date: Wed, 8 Aug 2007 09:01:58 -0700

Hi, all,

I'm trying to implement copy-dragging in a table view--that is to say, I want rows to move when no modifier keys are held down (which I have working) and I would like rows to be copied when the option key is held down (with which I am having trouble).

I have overridden the following method in my table view:

- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag
{
return flag ? NSDragOperationMove : NSDragOperationCopy | NSDragOperationCopy;
}


and I have tried to test for the dragging operation in the tableView:acceptDrop... method--but it always comes out to NSDragOperationCopy. I found two references in the archives to this, but no one actually mentions their solution.

Does anyone have a working example of how to successfully implement an option-drag copying mechanism? Or can anyone provide guidelines?

Cheers,
	Andrew
_______________________________________________

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


  • Follow-Ups:
    • Re: Copy-dragging in an NSTableView
      • From: Alastair Houghton <email@hidden>
    • Re: Copy-dragging in an NSTableView
      • From: mmalc crawford <email@hidden>
    • Re: Copy-dragging in an NSTableView
      • From: Sean Murphy <email@hidden>
  • Prev by Date: Re: Problem with NSTreeController, CoreData and bindings
  • Next by Date: Re: string encoding in NSMutableData
  • Previous by thread: Re: string encoding in NSMutableData
  • Next by thread: Re: Copy-dragging in an NSTableView
  • Index(es):
    • Date
    • Thread