My friend Hamen made me a question about context menu on statusbarpanels, the answer was very trivial for me but I realized should be complicated to find XUL snippets using only web search engines (eg googling).
Are duplicated informations present on the web the hell?
Suppose you need to write some code to read a socket in C/C++ or Java or your preferred language and you use Google or Yahoo to find a snippet, your search produces millions ofΒ interesting results so the information is duplicated and this duplication can confuse you but it has a great advantage, you can copy and paste like a monkey π discovering the code fits your needs.
Please consider duplication different from clone, duplication from my point of view means “the same topic explained many times in different manner”, clone means “exactly the same code reported in many different places”.
I don’t consider duplicated informations the hell because you can compare found results, you can discover new techniques or simply you can study deeply some aspect of the original problem.
Today XUL/XPCOM searches rarely produces hundreds (certain not millions) of results, the developer is like a pioneer.
I like to be a pioneer π but a novice developer can feel discouraged.
XUL developer isn’t alone, he/she has many friends
Ok, actually web search results about XUL are not comparable to other programming languages but developer can use al least two types of resources: human and software
The irc channels are great, I always found people ready to help me, also forums and mailing lists are very useful.
Honestly I consider some forum less useful, rarely I’ve received reply to my posts but I’m sure my ugly english didn’t helped me.
lxr is the first resource developer must learn to use, searching XUL code directly inside code
MDC and XUL Planet don’t require presentation π
Many novice developers don’t know DOMInspector, this is also due to the fact last Firefox releases removed it from standard installation
Help the community to help you
I admit, IRC is my preferred way to ask help but to speed up the process I try to prepare the code to discuss about so developer encounter another friend, the pastebin service.
I’ve written a Komodo macro that quickly submits a code selection to pastebin detecting language and other stuff.
You can find more info here, I’m sure other text editors allow similar solutionsΒ (if they don’t, drop them and use Komodo)
Unzip the world
Dear novice XUL developer, you must simply unzip the world!
What you are trying to do probably is already yet been done, so unzip extensions and take a look at their javascript/xul code.
The 80% of extensions don’t contain platform specific binary code so you can find all inside the XPI.
If you can’t access to Internet try to obtain a tarball with Firefox (or any other Mozilla application) source code and use your editor ‘Find in Files’ feature.
Take a look also inside the chrome directory of your installed Firefox π
I will try to spread XUL
Using this blog I want to create duplicated informations π (garbage??)
I will start a new section dedicated to XUL snippets for beginners users (like me at all), this snippets will be ready to run (when possibile).
I hope to spread XUL know-how starting from the basics.