• 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
How to accept drag of a URL on the dock icon?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to accept drag of a URL on the dock icon?


  • Subject: How to accept drag of a URL on the dock icon?
  • From: Andy Lee <email@hidden>
  • Date: Sat, 21 Dec 2013 18:06:20 -0500

I know how to accept files that are dragged from Finder to the application icon.  It's a matter of adding some settings to Info.plist and implementing the application:openFiles: application delegate method.

This does not work for dragging URLs from a web browser -- for example, dragging from Safari's URL field, or dragging an image being displayed in Safari to the dock icon.  What happens is, my application:openFiles: method is never called, and the URL is given back to Safari to reload.

Yet it is clearly possible for applications to accept dragging of URLs to their Dock icons, because it works for other browsers.  What are those other browsers doing?

I tried using a custom contentView for the dock tile, and having that view be a drag destination (call registerForDraggedTypes: and implement NSDraggingDestination methods).  But that didn't make any difference.

--Andy


_______________________________________________

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


  • Follow-Ups:
    • Re: How to accept drag of a URL on the dock icon?
      • From: Andy Lee <email@hidden>
  • Prev by Date: dataWithPDFInsideRect returns raster text
  • Next by Date: Re: How to accept drag of a URL on the dock icon?
  • Previous by thread: Re: dataWithPDFInsideRect returns raster text
  • Next by thread: Re: How to accept drag of a URL on the dock icon?
  • Index(es):
    • Date
    • Thread