Monday, November 26, 2007

Session 18 - Adding chrome to FirstXpcom extension

The lab I am doing is "Adding Chrome to FirstXpcom Lab" and it goes like this:
  • cd ~/.mozilla/firefox
  • cat profiles.ini //to find the name of your profile
  • cd 0sce3rh9.development/extensions
  • echo /home/armen/sandbox/firstxpcomchrome >
Once done this, you can run your minefield and you will see under Tools in red "Your localized item here" and you will see your extension in the add-on manager.
Myself, the first time didn't work and I decided to fix it. I went to the install.rdf and I saw that the line was wrong:
  • First XPCOM chrome 0.1 Armen {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 2.0.0.* 3.*
Obviously, it seems that I didn't fill properly the wizard since it should say this:
  • Replaced the code in firstxpcomchrome/content/overlay.js with what appears on the lab
I try to make it work, to just test it but I know there are pieces missing:
Chrome file doesn't exist: /home/armen/sandbox/firstxpcomchrome/content/firstxpcomdialog.xul

  • Therefore, let us create the file : firstxpcomchrome/content/firstxpcomdialog.xul with the XUL instructions about the dialog and with JavaScript instructions

At this point, it should work but I couldn't find out what the final results were to be until I noticed a little pop up window on the right hand corner (look at the huge red arrow)

So this lab is done and all that is left is to work on the 0.3 release, the zip file is here

No comments:

Post a Comment