Want to get filename for images dragged from Finder and from Safari / Firefox
Want to get filename for images dragged from Finder and from Safari / Firefox
- Subject: Want to get filename for images dragged from Finder and from Safari / Firefox
- From: Adam Holt <email@hidden>
- Date: Wed, 17 Aug 2005 20:47:14 +0100
I've got an NSImageView that I've subclassed in order to post a notification
of the filename of any images that are dropped on it.
My problem is that:
[pboard stringForType:NSFilenamesPboardType]
only gives me filenames for locally dragged files (from Finder), but I also
want to get a filename when I drag and drop in images from a browser.
I tried using [pboard stringForType:NSURLPboardType] instead, which works
better, i.e. it gives me the local filename (in file:// form), and gives me
the URL of images dragged from a browser EXCEPT when those images are
themselves links, in which case it gives me the URL that the image is linked
to and not the URL of the image itself which is of course what I need in
order to workout the filename.
Does anybody have a solution that could work for both local images and web
images?
Thanks,
Adam.
_______________________________________________
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