'Blog' Category
-
Jun112010
Implementing Multiple Inheritance in Javascript
Update
First of all I have a new logo and favicon – it’s that funky Ninja icon on the top left. It was designed by the gifted designer Liora Darom. I’ll be happy to provide her contact if someone is interested.
It’s been a while since my last post, usually I try to write more often but [...] -
Mar222010
Javascript Inheritance
In this post I will cover the following topics:
Understanding how the prototype works
Using the prototype for inheritance
The Inherit Function
Overriding methodsIn one of my previous post i talked about Object Oriented Javascript , where i mostly talked about class encapsulation. In this post i would like to advance to another important issue [...]
-
Feb212010
Debugging Firefox Extension Using Log File
Problog
In this post I will cover the following topics:Understanding debug requirements
Using the Mozilla preferences service to store debug mode
Using Mozilla file I/O to write debug messages into a fileIn one of me recent post I’ve talked about how to setup a development environment in Firefox. One of the problems in developing firefox [...]
-
Feb162010
Object Oriented Javascript
Problog
This post will cover the following topics:Javascript is not a toy!
How to define a class
How to set Publich methods
How to set Private variables
How to set static methodsJavaScript for Dummies?
Programming languages are like football teams – it doesn’t matter which you like, you will support it and protect its interest no matter what. Back in the [...] -
Feb092010
Setting a Nested Object with a String Key
In one of the projects that I’m working on I had to setup a property of an object in a general way. In order to do so, i wrote the following function:
function setValue(key,value,obj){
obj[key.toString()] = value;
}so calling the functuion like so
var obj = { a:1,b:2,c:3 };
setValue( "a" , 2 , obj );will [...]