Firefox Extension Developer Tips
Just a couple of tips for Firefox extension developers, hard earned after many hours of head scratching. Not adhering to either tips will confuse Firefox and XPCOM component will fail to load.
XPCOM components get loaded before chromes are loaded.
[Update: The most common problem related to this is Components.utils.import call fails during launch with NS_ERROR_FAILURE exception. To fix, wait until app-startup notification is received before importing javascript modules.]
This means anything defined in chrome.manifest won’t be available until “app-startup” event is observed. Note that Resource URI scheme “resource://” introduced in Firefox 3 uses resource directives in chrome.manifest which means you should defer Components.utils.import calls until “app-startup“.
XPCOM components implemented using Javascript should be defined as a pure object, not function.
So it should look something like this:
var MyServiceModule = {
registerSelf: function(compMgr, fileSpec, location, type) {
..
},
..
};





Mike Wilson 6:44 am on July 9, 2009 Permalink
Well, people can absorb both far more and far less information than they think. Following about 350 people is a nice sweet spot for me while I’m online.
Financial data streaming is an interesting case of “if you dump the data at them, they will figure out what to do with it.” (Ok, it’s not “if you build it, they will come” but close.)
The data overload can be mitigated pretty well with an effective software layer. TweetDeck’s columns, ThinkOrSwim’s analytics, etc. But “the naked stream” I think needs to be classified as a tool rather than an end product for users.
Hmm… still a half baked thought on my part.
A "Karriem" Khan 4:24 pm on July 10, 2009 Permalink
Can I buy your Party Ticket to the August Capital Party
donpark 4:38 pm on July 10, 2009 Permalink
It’s not transferable and the ‘ticket’ is a wristband which can’t be taken off w/o cutting. Sorry.