[Jslib] Re: include failure on windows

basic _basic@yahoo.com
Tue, 29 Jan 2002 17:29:48 +0800


tip 1, try running mozilla with

mozilla.exe -console

that will let you see better error messages.

where is your xul file? is it in a chrome dir? As far as I know, jslib doesn't 
work if your file is not in a chrome dir (security reasons), there is suppost to 
be a way to "unlock" the security check but I can't seem to get it to work with 
jslib.

basic

GJW wrote:
> started trying to use JSlib yesterday, and already I'm stumped.
> in xpcshell, this works:
> 
> js> load('chrome/jslib/jslib.js'); js> 
> include('chrome://jslib/io/file.js' <chrome://jslib/io/file.js%27>);
> js> f=new File('c:\\foo.dat');
> js> f.create();
> 
> but in xul:
> 
> <script type="application/x-javascript" 
> src="chrome://jslib/content/jslib.js" <chrome://jslib/content/jslib.js> />
> <script type="application/x-javascript">
>   include ("chrome://jslib/content/io/file.js" 
> <chrome://jslib/content/io/file.js>);
> </script>
> 
> fails.  javascript console tells me:
> Warning: reference to undefined property e.message
> Source File: chrome://jslib/content/jslib.js
> Line: 176
> Warning: reference to undefined property e.name
> Source File: chrome://jslib/content/jslib.js
> Line: 179
> Error: uncaught exception: Permission denied to create wrapper for object
> Is the problem the empty catch block on line 100 of jslib.js?  I'm 
> clueless.
> 
> TIA,
> --G
> 
> 
> 
> 
> 
> 
> 
> _________________________________________________________
> 
> Do You Yahoo!?
> 
> Get your free @yahoo.com address at http://mail.yahoo.com