• 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
Dragging to Folder in Dock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dragging to Folder in Dock


  • Subject: Dragging to Folder in Dock
  • From: Steve Gehrman <email@hidden>
  • Date: Fri, 20 Jan 2006 18:34:49 -0800


I've got a cocoa app. I'm trying to drag and drop a file to a folder in the Dock. Nothing happens when the item is dropped.


For dragging to the Docks trash can, it's kind of a hack, but maybe something similar is needed when dragging to a folder.

For dragging to the trash I use...

- (void)draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint operation:(NSDragOperation)operation;
{
if (operation == NSDragOperationDelete)
[self trashTheFiles];
}


This ugly hack works, but doing something similar with dragging to a folder is not possible. In the case of dragging to the trash, I can safely assume that any drag that has the operation NSDragOperationDelete is dragging to the trash can, but for dragging to a folder, there is no way to distinguish between a drag to the Docks folder and a drag to the Finder or another app that would handle the drop.

Anyone solved this?

-steve
_______________________________________________
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


  • Prev by Date: Re: Does + setKeys: triggerChangeForDependentKey override superclass' trigger keys?
  • Next by Date: NSTextField and NSLineBreakByTruncatingMiddle
  • Previous by thread: Re: Does + setKeys: triggerChangeForDependentKey override superclass' trigger keys?
  • Next by thread: NSTextField and NSLineBreakByTruncatingMiddle
  • Index(es):
    • Date
    • Thread