[Jslib] 'include' isn't known in FF for me
burleigh at indiana.edu
Fri Sep 17 19:04:01 EDT 2004
Pete Collins wrote:
>> The JS console says 'include' is unknown,
> Has nothing to do with your install. This is a common error that occurs
> when trying to use jsLib from a remote server or running outside of
> registered chrome.
> Tell us more about how you are invoking jsLib.
> For example, do you have a test xul file in say "/tmp" and you are
> typing file:///tmp/test.xul into the browser location bar?
> You will not be able to run jsLib in this manner because script has no
> privileges to access xpconnect in that context.
Pete and Brian: thanks both for your responses. Let me get to your
questions and share more observations:
- jslib version is 0.1.197
- it appears (in fox) on the extension list
- Pete's speculation is completely correct: I have an xul file that I'm
running from the file, file open menu. Would it have worked had I
edited some file in the chrome directory (windows) where I guess these
things get noted? I believe I read at xulplanet that that wasn't needed.
- I began to suspect firefox, so I installed Moz itself and didn't get
the complaints about not knowing "include" any more. What I'd wanted
from moz was to get closer to your documentation, to duplicate what you
doing from what looks to be some sort of shell (xpcshell). But alas, I
found no such exe in Moz.
- In moz, I was able to create a file (root of c:) but using write()
would fail every time--with the js console I'd see an exception the
exact text of which I don't have access to now--I believe it was the
xpcom network component complaining about the uri. I found this
perplexing because it seemed to me I shouldn't have been able to create
a file if I couldn't also write to it. I'd opened the file for append, btw.
- That's when I checked out (time pressure) and dropped down to what I
think is nsIFile itself. That got it done so I have a successfully
running kiosk application.
But I'd still like to use the library, if you could tell me where I went
wrong--probably "registration." I know documentation is often the last
thing, but if you could note in the documents in a section like "what
you need to do to get your stuff running," well, that would be so
helpful. I sense you all are using moz not fox; clearly the different
behaviors from the two played a perplexing role, to.
(Say, if you're taking requests, what I *really* wanted to do was to
make XML files starting with an xml dom whose text I then wanted to
write to disk.)
More information about the Jslib