The error i get is:

Error: [Exception... "Component returned failure code: 0x804b000a
[nsIStandardURL.init]"  nsresult: "0x804b000a (<unknown>)"  location:
"JS frame ::
file:///C:/Documents%20and%20Settings/Administrator/Desktop/ePaedia/Application/Windows/components/epaedia-protocolHandler.js
:: anonymous :: line 132"  data: no]
Source File:
file:///C:/Documents%20and%20Settings/Administrator/Desktop/ePaedia/Application/Windows/components/epaedia-protocolHandler.js
Line: 132

My code is:

        newURI: function(spec, charset, baseURI) {

                //Create a new URI object
                var objURI =
Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIStandardURL);


                
objURI.init(Components.interfaces.nsIStandardURL.URLTYPE_STANDARD,
-1, spec, charset, baseURI);

                //Return the new uri
                return objURI;

        },

the uri that is supposed to load is "epaedia://Life and
Times/intro.html" and within that page is a flash file,
"flash/intro.swf" that needs the uri to be resolved.


Boris Zbarsky wrote:
> James Newell wrote:
> > I also saw the init method used but it seems to be undefined on my url?
>
> Ah.  Yeah, you have to call init().  It's on nsIStandardURL, so you'll need to
> QI your URI to that.
> 
> -Boris

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to