content /
Component /
yyy.js
modules /
xxx.js
skins /
defaults /
locate /
chrome.manifest
install.rdf
I upload the file xxx.js yyy.js file with the command
Components.utils.import ().
In the manifest file I added the line "resource pippo modules/".
In the file yyy.js recall Components.utils.import ("resource://pippo/
xxx.js"), but firefox tells me that the file is not there.
Why? What mistake?
> I upload the file xxx.js yyy.js file with the command
> Components.utils.import ().
> In the manifest file I added the line "resource pippo modules/".
> In the file yyy.js recall Components.utils.import ("resource://pippo/
> xxx.js"), but firefox tells me that the file is not there.
> Why? What mistake?
I ran into the same problem recently. I figured out that loading of the
components (so yyy.js in your case) happens before chrome registration.
So at the point that yyy.js is loaded, the resource url is not valid
yet. I didn't find a solution yet. Moving the call to
Components.utils.import into the constructor in yyy.js did make the
component load. I couldn't test it if it really works, because I need to
solve some other problems first.
hope that helps.
Michiel
I also had this experience.
jjb
>
> hope that helps.
>
> Michiel
Mentioned this at
https://developer.mozilla.org/en/JavaScript_code_modules/Using_JavaScript_code_modules#Custom_modules_and_XPCOM.c2.a0components
Please update with details if you learn anything new.
Nickolay