Cannot create a XPConnect extension for Firefox

Yoric <[email protected]> Mon, 18 Oct 2004 19:35:25 +0100
Newsgroups gmane.comp.mozilla.devel.xpinstall
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
     Hi,
  During the last week, I have been attempting to write a XPCom object 
using JavaScript + XPConnect and Firefox 0.9.1 under Debian/testing.

So far, I have been able to create a xpi, register the Xpt (I think. At 
least, Components.interfaces.BookLibrarian is non-null) but the .js file 
containing the component and its module never seems to be invoked. I 
assume I have forgotten a step. The question is: which one ?


the structure of my .xpi is the following

Archive:  openberg.xpi
   Length     Date   Time    Name
  --------    ----   ----    ----
         0  10-15-04 21:00   chrome/
      3250  10-17-04 16:19   chrome/openberg.jar
         0  10-15-04 21:00   chrome/components/
         0  10-17-04 16:19   components/
         0  10-15-04 21:44   components/dummy
       152  10-15-04 20:40   components/BookLibrarian.xpt
      3435  10-17-04 16:24   components/BookLibrarian.js
      3435  10-17-04 16:24   components/openberg.js
       971  10-17-04 16:24   install.rdf


openberg.jar, in turn, contains

Archive:  openberg.jar
   Length     Date   Time    Name
  --------    ----   ----    ----
         0  10-17-04 15:20   content/
       525  10-14-04 19:21   content/contents.rdf
      2873  10-17-04 15:20   content/mainwindow.xul

As for openberg.js or BookLibrarian.js, these are basically copied and 
pasted from the cvs file /xpcom/sample/nsSample.js, plus additional 
alert() and a few changed names.

It turns out that this file never seems to be opened. There is no error 
or debug message neither on the terminal nor on the JS Console.

Any idea ?

Thanks,
  Yoric