Christian Biesinger wrote:
> Fabio Serra wrote:
>> The strange thing is that if I try to open the file with a simple
>> window.location = "file://" + filePath in the open/save dialog window
>> the default application is correctly selected. So Firefox somewhere know
>> how can handle the file.
> 
> Strange, that uses the exact same mechanism... What if you remove the
> mi.preferredAction setting line?

Different error but same result.
Error: Component returned failure code: 0x80070057
(NS_ERROR_ILLEGAL_VALUE) [nsIMIMEInfo.launchWithFile]
Source file: chrome://idealw3/content/js/main.js
Line: 267

But if I pass the file extension too

var mi = ms.getFromTypeAndExtension(type, ext);
mi.preferredAction = Components.interfaces.nsIMIMEInfo.useSystemDefault;
mi.launchWithFile(file);

sometimes it works like for OpenOffice documents.  But it doesn't for
.zip registered with KDE Ark (NS_ERROR_FILE_NOT_FOUND).

Do you know where I can find the code for the open/file dialog?
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to