• 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: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView) (From: Andrei Tchijov <email@hidden>)
 >Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView) (From: Nick Zitzmann <email@hidden>)
 >Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView) (From: Andrei Tchijov <email@hidden>)
 >Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView) (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView)
  • Next by Date: NSTableHeaderCell Woes...
  • Previous by thread: Re: Drag-And-Drop magic of copy vs. move (green "plus" sign magic)(in the context of NSOutlineView)
  • Next by thread: How do I
  • Index(es):
    • Date
    • Thread