[Jslib] (no subject)
pete at mozdev.org
Mon Jan 5 17:51:38 EST 2004
> I install vanilla jslib (current as of last night, read: 0.1.130) via XPI
> I run e.g. the jslib samples (as mentioned above) and while the includes
> mostly don't fail, the
> var f = new File(...);
So you ran:
./mozilla -P default -chrome chrome://jslib/content/samples/file.xul
You get the window, but see an undefined error when you press say
> Regretfully there is _no_ xpcshell available in this vanilla (MacOS,
> currently Mozilla 1.6b) nor the previous 1.5 installations (or I just
> don't know how to install it, no references to seperate installation are
> to be found), so I can't go via CLI on the major (deployed) installs.
Just jump onto a bash shell. I think MAC finally has one of these now.
$ ./mozilla -P default -chrome chrome://jslib/content/
You should see the jslib splash.
If you do, jslib is indeed installed.
> If you wish, I can flood you with various details of the OSes, but this
> is moot AFAICS due to the fact, that the jslib neither runs flawlessly
> on my Linux (suse, redhat, gentoo), Windows (w2k, xp-pro), nor MacOS-X
> (10.2.8) with neither Mozilla 1.4, 1.5, 1.6 nor Firebird (though the
> firebird 0.6.1 on Mac _had_ an xpcshell which seemingly functioned, but
> running the xul-file produced "include not defined").
> The javascipt-console messages (of the samples) are all the same: "<bla>
> not defined"
I'm not entirely sure what your problem is. "include not defined"
usually means jslib is not installed or is not properly installed.
Perhaps there are two versions installed? One in your mozilla chrome dir
and one in your mozilla user profile dir. This is possible due to the
previous xpInstall changes made a few weeks ago.
> Temporary Conclusion:
> Either I'm doing something _very_ wrong, I have gremlins tweaking bits,
> or the universe doesn't like me.
> I'm at loss of how to dump the required information (not knowing _what_
> you want to know), so it might help if you could just provide me with a
> script or a link to the required information, and I'll gladly supply.
Manually remove jslib.
$ rm -rf chrome/jslib*
$ rm -rf ~/.mozilla/default/...slt/chrome/jslib*
Install the *developer* install. Create a new profile and repeat the
tests above to ensure it is installed.
If all is well, then
edit the file jslib/samples/file.xul to suit your local file path needs
based on the OS you are using.
Replace the code there with this code:
// a local file path
var localFile = "/tmp/fubar.dat";
var f = new File(localFile);
$ ./mozilla -P new_profile -chrome chrome://jslib/content/samples/file.xul
> If I'd kept up using jslib (I started up around 2001, but was forced to
> drop it due to time-issues) I'd be proficient enough to track this on my
> own. For now, I just want to get the damn examples working, so I can see
> it alive and then get to the real programming.
> Being a paranoid programmer (tm) I always test everything plain vanilla
> style, so I don't really get why it doesn't run out of the box.
Turning dump on will produce output that is verbose enough to help
clarify what the problem you are having is. This is accomplished w/ the
jslib_turnDumpOn(); call provided in the sample above.
jslib is widely used among Mozilla applications so, I suspect there is
an uncommon snag you ran into that when resolved, hopefully will benefit
the readers of this list.
Hope this helps.
More information about the Jslib