Copy-dragging in an NSTableView
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