[Jslib] include errors in trying to experiment with file i/o

dan hitt dan.hitt at gmail.com
Mon May 31 15:32:29 PDT 2010


Hi jsLib,

I downloaded jslib because i would like to use the file i/o as described in:
   http://jslib.mozdev.org/libraries/io/file.js.html

I am trying to follow along on the example in file.js.html.

I'm trying to do with with a command line js interpreter
to minimize all potential issues in a first test.

I built firefox, with xpcshell, because i understand that i
cannot just use the js that comes with ubuntu 9.10,
the system i use.  (And in fact, that js, JavaScript C,
1.7.0, really does give me more issues than xpcshell.)

The example in file.js.html says to first do
    load('chrome/jslib/jslib.js')
That file does not exist, at least if you just download
the jslib tarball, but the tarball does have jslib/jslib.js.

The load command
    load('......jslib/jslib.js')
seems to work ok.

But all of the include commands i tried failed
(reported status -2147942487).  For example,
   include('.......jslib/io/file.js');
reports status -2147942487.

And commands of the form
   f=new File('......');
give a reference error on File.

So i assume that i have an include() order problem
of some sort, or maybe i haven't load()ed enough.

Thanks in advance for any advice on how to
deal with this.

dan


More information about the Jslib mailing list