Re: Accepting url drags directly from safari
Re: Accepting url drags directly from safari
- Subject: Re: Accepting url drags directly from safari
- From: Allan Odgaard <email@hidden>
- Date: Fri, 27 Feb 2004 19:19:06 +0100
On 26. Feb 2004, at 20:17, zeno wrote:
I think this is quite difficult ;-)
I would like to tell my droplet to accept drags directly from the
safari's location bar, I mean, not .webloc files (this can be easily
done), but being able to drag the little url icon (favicon) directly
from the location bar and drop it to my application's icon.
I too spent a lot of time trying to make it work -- my conclusion was
that this is simply not supported -- i.e. the system tests if your
application supports the file type of the dragged object (using your
applications Info.plist), but it only does so for files.
At least declaring lots of URL types did not help.
Then I tried to drag URLs to OmniWeb and IE, and neither of these
support receiving URLs either, so I concluded that this was an
oversight.
The problem, I think, is that many standard callbacks are declared to
only accept files, e.g. application:openFile: which is the delegate
method invoked when files are dropped on your application icon -- there
is no application:openURL: -- interestingly, NSDocumentController does
declare a lot of URL versions of its methods, but there is no way it
can request the application to open anything but file URLs...
I also think that NSDocumentController actually fails to handle
non-file URLs in the URL-methods -- which is a bit irritating, as e.g.
an ftp program could just as well be model based and have an URL
represent a document (thus getting Open Recent... support etc.).
_______________________________________________
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.