Re: Detecting option key down/up during drag
Re: Detecting option key down/up during drag
- Subject: Re: Detecting option key down/up during drag
- From: Keith Renz <email@hidden>
- Date: Mon, 17 Nov 2003 15:31:42 -0500
Oliver,
I guess you only "wired" the NSTableView drag & drop facility.
Yes, exactly.
I think you may have to subclass NSTableView and overload the
pre-defined NSDraggingDestination protocol
Okay, thanks. I did this and added this override method to my table
view subclass
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag
{
return flag ? NSDragOperationMove | NSDragOperationCopy :
NSDragOperationCopy;
}
which does allow me to check the dragging source operation mask in my
table view tableView:validateDrop:proposedRow:proposedDropOperation:
method. What is odd, though, is that the mask is either 1 (copy) with
the option key down or 17 (move + copy) with the option key up, not 1
(copy) or 16 (move).
The problem still exists where pressing the option key down while the
mouse is not moving (but still in the drag operation) doesn't change
the drag operation from move to copy.
I also noticed that whatever drop operation I set in
tableView:validateDrop:proposedRow:proposedDropOperation: is not
retained in tableView:acceptDrop:row:dropOperation: when the mouse is
released.
Keith
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.