OnSwipe redirect code

Friday, March 14, 2008

Styling Chatzilla userlist and XUL Trees

In my previous post I mentioned how I was fiddling with Chatzilla "css" files to get a custom style so that and failed utterly with the userlist. And it was later I found this website: How to style your Chatzilla userlist to fit with a dark motif. - Just Imagine... a weblog

This webpage (yet another blog post) tells how the userlist can be customized. Since the userlist is a "XUL Tree" styling it is a little complicated. In XUL trees are something like dynamically populated UI components. So you do not actually know what a treecell will contain when being displayed. So we use css with a few predefined pseudo classes and a couple of properties to decide what style has to be applied for anything contained in a treecell or for that matter the whole tree itself that is present as the userlist.

This styling thing is really cool and fun. Just try it out.

Thursday, March 13, 2008

Faces of mozillians in Chatzilla

Today I discovered this cool page on the chatzilla website that provides motifs (themes) for Chatzilla which will show faces of the mozillians. Check out this page: moznet faces

Though not all of them are listed, there are quite a lot that I know. This is a really awesome idea. And the best part was the way these motifs can be applied. I just had to drag and drop the link to the css files in the Chatzilla message window and that motif is just picked up. This amazed me more than anything.

I trying to use these motifs I also ended up reading how I can style my chatzilla with some custom (read weird) colors and images by simply writing some css rules. It in fact is just overriding any of the already defined css style class definitions. So its really simple. I will write about that separately. But you know what this whole styling this is real fun and a must try for anyone related to web and irc.

Technorati Tags:

Tuesday, March 4, 2008

Special chars and Escape sequences in .NET strings

Having come from C/C++ programming, and that too mainly console programming, escape sequences were very dear to me as they were my sole friends when it came to formatting the output. Now at work I work with C# .NET and things are not the same. I wrote a XSLT processor, as part of my job, and I wanted to log every successful XSL trasnformation. Well the file I/O was a lot easier with .NET types, but introducing an newline at the end of every log entry was a big pain. As I used to do earlier I simple put a "\n" at the end of the log message. This resulted in a empty square box being placed there instead of a newline. This was totally wierd and I started to wonder whether I have been writing Japanese???!!!

Then a little bit googling told me that .NET has encapsulated these special chars and newlines in a type called "Environment". This makes sense. Newline can be differnet in different environment. And with this encapsulation we get the correct newline for any environment.

So in C# if you want to add a newline to your string use the "Environment.Newline" object. VB .NET developers are, as usual, lucky with a easier encapsulation. They have a type called "ControlChars" and this can be used like this: "ControlChars.crlf" which of course is more intutive that something like environment.