[Jslib] problems with Dir from jslib version 0.1.105 on Mozilla 1.5

Con Hennessy con.hennessy at propylon.com
Wed Dec 3 16:37:13 EST 2003


Hi all,
	I'm new to jslib so I'd appreciate some help.
I am trying to use jslib 0.1.105 in a fresh install of Mozilla.
My js code is :
<script>
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
</script>
<script type="application/x-javascript" src="chrome://jslib/content/jslib.js" 
/>

<script>
include (jslib_dir);

function addYears()
{
dump ( "addyears 2\n" )
  var oireachtas = Dir(  "/tmp/x" );
dump ( "addyears 3\n" )
}
</script>

But all I get is :
Error: this.initPath is not a function
Source File: chrome://jslib/content/io/dir.js Line: 85

and the output :
chrome://jslib/content/io/dir.js
chrome://jslib/content/io/filesystem.js
*** load: filesystem.js OK
*** load: dir.js OK
addyears
addyears 2
Document chrome://sfi/content/a4.xul loaded successfully

I also tried with jslib version 0.1.95 and got the same error message.

Any help appreciated,
CPH



More information about the Jslib mailing list