Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView)
Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView)
- Subject: Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView)
- From: Andrei Tchijov <email@hidden>
- Date: Tue, 6 Dec 2005 22:58:15 -0500
Thanks again. I got it.
if(( [[[ NSApplication sharedApplication ] currentEvent ]
modifierFlags ] & NSAlternateKeyMask ) != 0 ) {
return NSDragOperationCopy;
} else {
return NSDragOperationMove;
}
works beautifully.
On Dec 6, 2005, at 10:56 PM, Nick Zitzmann wrote:
On Dec 6, 2005, at 8:49 PM, Andrei Tchijov wrote:
Now how I can implement behavior similar to Finder. Do move (no
green plus) by default and copy (green plus) when user holds
"option" key?
You can get the current app event, which includes the key(s) being
held down (if any), by calling -[NSApplication currentEvent].
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden