Hi all,
I'm trying to build a class this way:

Code:
function MouseLogger() {
	this.fps = 2;
	this.state = 0; //0 = stop, 1 = play, 2 = record
	// recorded coordinates
	this.eventsQueue = new Array(); 
        ...
}
I defined a function:

Code:
MouseLogger.prototype.init = function() {
	log.debug("MouseLogger init");
	this.startRecord();
}
which works when I call "this.init();" anywhere in the class.

I did the same thing defining:

Code:
MouseLogger.prototype.addGuiEvent = function(e) {
	if (e){
		this.eventsQueue.push(e);
		//log.debug("queue size: ",this.eventsQueue.size());
	} else {
		log.error("addEvent null");
	}
}
But when I call "this.addGuiEvent(e);" my Firefox says:

Code:
Error: this.addGuiEvent is not a function
I can't see anything wrong with it. Any hints?

Thanks!
Mulone