• 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: Detecting option key down/up during drag
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Drawing Cells Manually
      • From: Jason Gignac <email@hidden>
  • Prev by Date: Re: Superclass Changing Wierdness
  • Next by Date: Re: Writing an NSArray to disk
  • Previous by thread: Re: Detecting option key down/up during drag
  • Next by thread: Drawing Cells Manually
  • Index(es):
    • Date
    • Thread