[Jslib] Re: jslib include
Eric Plaster
plaster@urbanrage.com
Tue, 18 Sep 2001 00:38:03 -0500
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<br>OK, I feel stupid. It had nothing to do with the include() function.
It was my code that had the following line in it:
<p><tt><font size=-1> spell.class = "Wizard";</font></tt>
<p>And I guess using a reserved word as an attribute is a bad thing!
;)
<p>It does bring up an issue though. I didn't figure this out until
I ran xpcshell and did the following:
<p><font size=-1>j<tt>s> load('chrome/rpgtools/spellviewer/plugins/phb.js');</tt></font>
<br><tt><font size=-1>chrome/rpgtools/spellviewer/plugins/phb.js:95: SyntaxError:
missing name after . operator:</font></tt>
<br><tt><font size=-1>chrome/rpgtools/spellviewer/plugins/phb.js:95:
spell.class = "Wizard";</font></tt>
<p><tt><font size=-1>chrome/rpgtools/spellviewer/plugins/phb.js:95: ........^</font></tt>
<p>That spells it out pretty well. Is there any way we can get at
this information and pass it through our error dump function?
<p>Eric Plaster wrote:
<blockquote TYPE=CITE>
<br>Ok, maybe I'm just blind, but I seem to have run into an error that
I can't figure out. Pete, could you help me out? I'm getting
the following error:
<br>
<p>-----======[ ERROR ]=====-----
<br>ERROR: in jslib.js: include <a href="file:///home/plaster/mozilla/dist/bin/chrome/dndtools/spellviewer/plugins/phb.js">file:///home/plaster/mozilla/dist/bin/chrome/dndtools/spellviewer/plugins/phb.js</a>
is not a valid path or is already loaded
<br>Name:
SyntaxError
<br>Message:
missing name after . operator
<br>Result:
<br>Location:
<br>NS_ERROR_NUMBER: NS_ERROR_INVALID_ARG
<br>------------------------------
<p>If I do a "ls -l " of the path its there and permisions are correct.
The code:
<p>var list = importdir.readDir();
<br>for( var i=0; i < list.length; i++ ) {
<br> include(list[i].URL);
<br>}
<pre>--
----
Eric Plaster Urban Rage Software
Senior Software Engineer (612)555-5555
plaster@urbanrage.com <a href="http://www.urbanrage.com">http://www.urbanrage.com</a></pre>
</blockquote>
<pre>--
----
Eric Plaster Urban Rage Software
Senior Software Engineer (612)555-5555
plaster@urbanrage.com <A HREF="http://www.urbanrage.com">http://www.urbanrage.com</A></pre>
</html>