So I’m new to XUL.
As a language it seems easy enough and I’m already pretty handy at javascript, but the thing I can’t wrap my mind around is the way you access resources from manifest files or from xul files. So I did the ‘Getting started with XULRunner’ tutorial… https://developer.mozilla.org/en/getting_started_with_xulrunner
and I’m more confused than ever… so I’m hoping someone can set me straight.
Here is why… (you may want to open the tutorial for this).
The manifest file, the prefs.js and the xul file all refer to a package called ‘myapp’, that if everything I’ve read thus far on MDN can be trusted means that inside the chrome directory there must be either a jar file or directory called myapp, but there is neither. The root directory of the whole app is called myapp, but I called mine something completely different and it still worked.
When I placed the content folder, inside another folder called ‘foo’, and changed all references to ‘myapp’ to ‘foo’, thus I thought creating a ‘foo’ package, a popup informed me that it couldn’t find ‘chrome://foo/content/main.xul’, though that’s exactly where it was.
Also in the xul file it links to a stylesheet inside ‘chrome://global/skin/’ which doesn’t exist. Yet something is overriding any inline styling I try to do to the button. And when I create a css file and point the url to it, the program doesn’t even run.
Can someone please explain what strange magic is going on here… I’m very confused.
When you register a
contentfolder in achrome.manifestyou must use the following format:The
uri/to/files/may be absolute or relative to the location of the manifest. That is, it doesn’t matter what the name of the containing folder is relative to your package name; the point is to tell chrome how to resolve URIs of the following form:The
packagenamesimply creates a mapping to the location of the files on disk (wherever that may be).