[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>
&nbsp;
<br>OK, I feel stupid.&nbsp; It had nothing to do with the include() function.&nbsp;
It was my code that had the following line in it:
<p><tt><font size=-1>&nbsp; spell.class = "Wizard";</font></tt>
<p>And I guess using a reserved word as an attribute is a bad thing!&nbsp;
;)
<p>It does bring up an issue though.&nbsp; 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:&nbsp;&nbsp;
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.&nbsp; 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>&nbsp;
<br>Ok, maybe I'm just blind, but I seem to have run into an error that
I can't figure out.&nbsp; Pete, could you help me out?&nbsp; I'm getting
the following error:
<br>&nbsp;
<p>-----======[ ERROR ]=====-----
<br>ERROR: in jslib.js: include&nbsp; <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:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SyntaxError
<br>Message:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
missing name after . operator
<br>Result:
<br>Location:
<br>NS_ERROR_NUMBER:&nbsp;&nbsp; NS_ERROR_INVALID_ARG
<br>------------------------------
<p>If I do a "ls -l " of the path its there and permisions are correct.&nbsp;
The code:
<p>var list = importdir.readDir();
<br>for( var i=0; i &lt; list.length; i++ ) {
<br>&nbsp;&nbsp;&nbsp; include(list[i].URL);
<br>}
<pre>--&nbsp;
----
Eric Plaster&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Urban Rage Software
Senior Software Engineer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (612)555-5555
plaster@urbanrage.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.urbanrage.com">http://www.urbanrage.com</a></pre>
&nbsp;</blockquote>

<pre>--&nbsp;
----
Eric Plaster&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Urban Rage Software
Senior Software Engineer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (612)555-5555
plaster@urbanrage.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="http://www.urbanrage.com">http://www.urbanrage.com</A></pre>
&nbsp;</html>