I used to be able to do:
var fileUrl = Components.classes["@mozilla.org/network/standard-url;1"]
.createInstance(Components.interfaces.nsIFileURL);

But that no longer works, reading bug 157135 made me thought something like:

var url = Components.classes["@mozilla.org/network/standard-url;1"]
.createInstance(Components.interfaces.nsIURL);
url.spec = "file:///c:/something.txt";
url.QueryInterface(Components.interfaces.nsIFileURL);

would work, but it doesn't. I now use the method from abCardViewOverlay.js but I would like to know why the above doesn't work anymore? Or whats the proper way to get nsIFileURL interface?

Regards

--
Mike Lee
Website: http://www.exitspace.net/mike


Reply via email to