• 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 to the finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drag and drop to the finder


  • Subject: Re: drag and drop to the finder
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 04 Dec 2011 10:52:35 -0800

On Dec 2, 2011, at 3:58 PM, Eric Smith wrote:

> I want to declare a drag type that the finder will recognize, but that can be used for other destinations as well, like mail.  Right now, my users have to do option+drag for dragging files to the finder, in which case I call [NSView dragPromisedFilesOfType:..], and if they want to drag to something like mail they just drag, in which case I call [pboard declareTypes:...].  I can't figure out how to declare a type that will cause the finder to request the data.  How the heck do I do this?  All the sample code I've seen either drags to some application, or drags to the finder.. they're not combined.

You can provide different data flavors in the drag, one of which is the promised-files type that the Finder looks for. -dragPromisedFilesOfType: is a convenience method that creates a drag that just has the promised-files type in it; I think you’ll have to abandon it and create the drag yourself, declaring the promise type explicitly.

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >drag and drop to the finder (From: Eric Smith <email@hidden>)

  • Prev by Date: Re: "Unusual" interface, usage of 3d party GUI framework and Mac App Store
  • Next by Date: Re: Escape xml with CFXMLCreateStringByEscapingEntities
  • Previous by thread: drag and drop to the finder
  • Next by thread: Debugging problem
  • Index(es):
    • Date
    • Thread