Re: Detecting option key down/up during drag [solution]
Re: Detecting option key down/up during drag [solution]
- Subject: Re: Detecting option key down/up during drag [solution]
- From: Keith Renz <email@hidden>
- Date: Mon, 17 Nov 2003 22:42:02 -0500
- Resent-date: Mon, 17 Nov 2003 22:42:39 -0500
- Resent-from: Keith Renz <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: Cocoa-Dev List <email@hidden>
The solution to this dilemma is to subclass NSTableView and in your
subclass, override both of the following methods. You will then get the
Finder-like behavior of instantly changing the drag operation type
(including the cursor) during the drag operation.
Dragging source method:
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag;
Dragging destination method:
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
A few notes:
You must still provide the the standard dragging methods in your table
view data source.
Invoke super first in draggingUpdated:.
Olivier, thanks for pointing me in the right direction!
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.