McKnight, Mark
17 years ago
Hi all,
I am following the directions in the tutorial at:
http://developer.mozilla.org/en/docs/XUL_Tutorial:Property_Files
First I create a test.properties file in the content directory alongside
my .xul file with the following content:
message.helloWorld=Hello World.
Then I add the following code to my .xul file (copied and pasted from
the tutorial):
<stringbundleset id="strbundles">
<stringbundle id="strings"
src="test.properties"/>
</stringbundleset>
Finally, I add this code to my .js file (again pulled directly from the
tutorial):
var strbundle = document.getElementById("strings");
var helloWorld=strbundle.getString("message.helloWorld");
alert(helloWorld);
When I run the application with XULRunner (1.9b5pre - 2008031309) I
receive the following error message in the Error Console:
Error: uncaught exception: [Exception... "Component returned failure
code: 0x804b000a (NS_ERROR_MALFORMED_URI)
[nsIStringBundle.GetStringFromName]" nsresult: "0x804b000a
(NS_ERROR_MALFORMED_URI)" location: "JS frame :: XStringBundle ::
getString :: line 17" data: no]
Any ideas would be greatly appreciated.
Thanks in advance,
Mark.
I am following the directions in the tutorial at:
http://developer.mozilla.org/en/docs/XUL_Tutorial:Property_Files
First I create a test.properties file in the content directory alongside
my .xul file with the following content:
message.helloWorld=Hello World.
Then I add the following code to my .xul file (copied and pasted from
the tutorial):
<stringbundleset id="strbundles">
<stringbundle id="strings"
src="test.properties"/>
</stringbundleset>
Finally, I add this code to my .js file (again pulled directly from the
tutorial):
var strbundle = document.getElementById("strings");
var helloWorld=strbundle.getString("message.helloWorld");
alert(helloWorld);
When I run the application with XULRunner (1.9b5pre - 2008031309) I
receive the following error message in the Error Console:
Error: uncaught exception: [Exception... "Component returned failure
code: 0x804b000a (NS_ERROR_MALFORMED_URI)
[nsIStringBundle.GetStringFromName]" nsresult: "0x804b000a
(NS_ERROR_MALFORMED_URI)" location: "JS frame :: XStringBundle ::
getString :: line 17" data: no]
Any ideas would be greatly appreciated.
Thanks in advance,
Mark.