Snippets code from my daily experience

July 7, 2007

Short-circuits, innocent code and nsIDOMEvent targets

Filed under: firefox,flock,mozilla,xpcom,xul — dafi @ 6:08 pm

An user on AMI tells me that my bonsai RichFeedButton doesn’t work when installed together with another extension.

I install the offended extension and discover that RichFeedButton breaks this little jewel!

The solution was simple but the bug hunting was hard 😦

The problem was into an innocent function associated with a listener that simply checks the nsIDOMEvent‘s target id and attrName as shown below
if (event.target.id == "xxx" && event.attrName == "yyy") {
...
}


For some motivations the “event.target” expression breaks the other extension.

I suspect event.target at some event stage isn’t valid and generates internally some error corrupting (???) the full event queue or simply I’m a bad programmer 😦

The solution??

Simply swaps first equality test with second one

if (event.attrName == "yyy" && event.target.id == "xxx") {
...
}


The javascript short-circuit evaluation ensures me event.target.id is parsed only if first condition is true. πŸ™‚

Every day I learn something about XUL and its implementation… πŸ˜‰

How many applications based on XUL exist?

Filed under: firefox,flock,mozilla,xul — dafi @ 11:43 am

Thanks to

Jane Ocean to give me many names to add to this list

marcoos to help me to discover new cool XUL applications

The Mozilla XUL application framework is used to create mainly two types of standalone applications: browsers and email client.

But XUL has all potential to be used to create any complex and cross platform application.

Well, I want to list all applications based on XUL (or XULRunner)

Browsers

absolutely the most significant XUL target

  • Firefox – no words… the browser changed internet πŸ˜‰
  • Mozilla Suite – All in one, browser+email+HTML composer
  • SeaMonkey – The Mozilla Suite successor, I think is better than Firefox but I love bell and whistle
  • Flock – A step ahead but actually only a Firefox with some extensions already installed (IMHO)
  • Netscape 8.x – No revolution but contains many interesting features, it’s based on Firefox 1.0
  • Netscape 9.x – it’s based on Firefox 2.0
  • Minimo – Browser for mobile devices
  • Camino – Browser for MacOsX It’s based on Mozilla’s Gecko but isn’t a XUL application
  • Swiftweasel and Iceweasel – Binary optimized Firefox. Iceweasel is under GNU license
  • WebRunner

Email clients

anybody has news about the Eudora porting to XUL??

HTML Editors

nothing so innovative but very usable

  • NVU – why this cool project has been abandoned????
  • kompoZer – the NVU successor

Schedulers, calendars and PIM

I’m waiting to completely remove Outlook

  • Sunbird – Cool, easy and enough stable
  • Lightning – Ok Ok I know! 😦 This isn’t a standalone application but sunbird as extension

Developer tools

  • Komodo – Interesting IDE project, cool KomotoEdit full free (added 08 Sep 2007)

Instant Messaging

Other categories

Non stricly web-related XUL applications

  • Celtx – Celtx is a project collaboration tool for people who work in film, TV, theater and New Media
  • SongbirdTHE web media player, I really love it but maybe it’s a bit slow and unstable
  • eMusic DLM – Download manager
  • Etna – XML editor
  • Joost – Internet TV viewer and more
  • Miro – Video player
  • Chatzilla – IRC client
  • Second Life client – The well known artificial world (added 28 Jul 2007)
  • Evergreen – An enterprise-class Integrated Library System (ILS) (added 23 Sep 2007)

At this time I found only these but my search continue πŸ˜‰

Do you know other XUL based applications?

Blog at WordPress.com.