Re: How to get a CF_HDROP from javascript

Neil <[email protected]> Tue, 04 Apr 2006 12:57:51 +0100
Newsgroups gmane.comp.mozilla.devel.windows
Message-ID <[email protected]>
Harry wrote:

> I have a variable lf of type nsILocalFile and I want to get the 
> CF_HDROP clipboard format (from javascript, latest FF1.5).
>
> My understanding is that I need  to put a "application/x-moz-file" 
> flavour in the clipboard, but setTransferData seems to fail.
> Somehow there is a CF_HDROP on the clipboard, but seems to be zero data.
>
> I tried many variants of pointers (nsIFile, nsILocalFile, 
> nsISupports), also I used nsISupportsString encapsulating 
> nsIFile.path, nsIURI.spec but nothing helps.
>
> I'm able to put it there as text as "text/unicode" or 
> "application/x-moz-url", but thats not what I want to realize.

It can't be done in script, because that flavour only accepts ANSI file 
names. Your best bet is to file a bug requesting (say) an 
application/x-moz-unicode-file flavour.

-- 
Warning: May contain traces of nuts.