• 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: NSDragOperationDelete
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDragOperationDelete


  • Subject: Re: NSDragOperationDelete
  • From: Steve Gehrman <email@hidden>
  • Date: Mon, 7 Oct 2002 12:27:13 -0700

Is the Dock written in Cocoa? If so, it must be doing something to communicate with the Finder to indicate a delete.

On Monday, October 7, 2002, at 07:14 AM, Brian Webster wrote:

On Monday, October 7, 2002, at 12:00 AM, email@hidden wrote:

The problem is that if I drag a file from the Finder, the Finder does
nothing. The Finder should do something similar to my draggedImage call
and see that the drag operation is NSDragOperationDelete and move the
file to the trash.

I believe this is because the Carbon drag manager uses a somewhat different paradigm when it comes to deleting files. There isn't really a separate "delete" operation, but it is instead treated as a file move, but applications are supposed to check to see if the file (or other object) is being moved to the trash, and if it is, act appropriately. The trash can in the dock will return the trash folder as the drop location and the Finder responds by moving the dragged files to the trash. Unfortunately, there doesn't appear to be any mechanism in Cocoa to do this.

That being said, I think you should think twice about creating an exact duplicate of a standard interface element such as the trash can, unless you're making some sort of dock replacement or something along those lines.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster


--
Steve Gehrman
email@hidden
http://www.cocoatech.com
_______________________________________________
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:
    • Re: NSDragOperationDelete
      • From: Brian Webster <email@hidden>
References: 
 >Re: (From: Brian Webster <email@hidden>)

  • Prev by Date: drag and drop
  • Next by Date: Re: Newbie ImageWell question
  • Previous by thread: Re:
  • Next by thread: Re: NSDragOperationDelete
  • Index(es):
    • Date
    • Thread