[Javascript] Firefox and Konqueror: "this.nameOfMethod is not a function" error
Loïc Prieto
loic_sephiroth at yahoo.es
Sun Feb 19 17:46:20 CST 2006
Hi there, this is my first time writing to a mail list, so please
forgive me all the many netiquette breaks i may cause, and do not doubt
in correcting me in all there is to correct. Heck, i do not even know
how i will get responses and where to look for them.
So...Im' writing a gui library in javascript (i know, there are many top
quality gui builder libraries out there, but i'm doing it for the sake
of it), and after i get some base classes writed and ready to use, i get
some wierd error. "TypeError: Value undefined (result of expression
this.setInternalMouseListener) is not an object. Cannot be called"
The code where this happens is:
<pre>
CComponent.prototype.setInternalMouseListener = function(pMouseListener)
{
this.internalMouseListener = pMouseListener;
this.internalMouseListener.setListened(this);
if(this.getDomNode() != null)
{
this.getDomNode().addEventListener("click",function(){pMouseListener.mouseClicked();},false);
this.getDomNode().addEventListener("mouseover",function(){pMouseListener.mouseEntered();},false);
this.getDomNode().addEventListener("mousedown",function(){pMouseListener.mousePressed();},false);
this.getDomNode().addEventListener("mouseup",function(){pMouseListener.mouseReleased();},false);
this.getDomNode().addEventListener("mouseout",function(){pMouseListener.mouseExited();},false);
this.getDomNode().addEventListener("mousemove",function(){pMouseListener.mouseMoved();},false);
}
}
</pre>
I have no clue, as to what the error actually means. I tried in Firefox
1.5.0.1, and what i get is: "this.setInternalMouseListener is not a
function"
So, it seems that the method
CComponent.setInternalMouseListener(pMouseListener) is not recognized as
a function...what could possibly go wrong here to cause this to happen?
Well...thank you in advance for your help.
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
More information about the Javascript
mailing list