Welcome to European Tribune. It's gone a bit quiet around here these days, but it's still going.
Display:
OK, I haven't looked into it, but I gather that the .xpi is just a zipped archive of javascript that operates on some sort of syntactic tree for the webpage, with XML describing where to insert action hooks in the general operation of Firefox.

But it must be horrendeously painful to code the scripts in vi, restart firefox to test, etc.. Any thing that gets a little bigger than 30 lines would need hot-swapping of script code, a full blown debugger with step-by-step, variable inspection, test-case replay, etc...

Have you got any of these that you would recommend ?

Pierre

by Pierre on Thu Mar 15th, 2007 at 05:51:18 AM EST
[ Parent ]
Look at this resource first. You really need to setup those prefs!
Setting up extension development environment - MozillaZine Knowledge Base

Then install this:
Ted's Mozilla page - Extension Developer's Extension

The Extension Developer's Extension exists to make life easier for Firefox extension developers. Testing JavaScript code, prototyping XUL layouts, and building XPI packages are all made easier by this extension. Install it and try it out!

I also found it convenient to use a trick to prevent javascript caching to cause a major headache. If one writes a script in a file which is read into a string in another script, and the evaluated with the eval() function there are no caching problems. There is also a convenient javascriptobject.toSource(); For writing evaluatable script strings from object. This comes in handy also because sharing data between different window entities is quite inconvenient. I would say this is also a must read:
Working with windows in chrome code - MDC

Working with windows in chrome code From MDC

This article describes working with multiple windows in Mozilla chrome code (XUL applications and Extensions). It contains tips and example code on opening new windows, finding an already opened window, and passing data between different windows.

It tells you important stuff, like how to get to the top level chrome window, how to access the sidebar, etc. All in all it is a minor nightmare. Not a very logical layout of an object model at all!

by someone (s0me1smail(a)gmail(d)com) on Thu Mar 15th, 2007 at 06:25:53 AM EST
[ Parent ]
Thanx, I'll look into all that someday !

Pierre
by Pierre on Thu Mar 15th, 2007 at 07:35:55 AM EST
[ Parent ]

Display:

Top Diaries

Occasional Series