Hi

I d'ont understand why this code don't work properly.

var essai = Class.create();
essai.prototype = {
        initialize : function(texte){
                this.texte = texte;
        
document.addEventListener("click",this.callThisMethod.bind(this),false);
                document.addEventListener("click",OtherSimpleFunction,false);
        },
        callThisMethod : function(){
                this.ThisMethod();
        },
        ThisMethod : function(){
                alert(this.texte);
                //Le problème se trouve donc ICI, juste là...
                //Pourquoi la ligne ci-dessous ne fonctionne pas
        
document.removeEventListener("click",this.callThisMethod.bind(this),false);
        }
}

function OtherSimpleFunction(){
        alert('Hello, Just One Time');
        document.removeEventListener("click",OtherSimpleFunction,false);
}

var a = new essai('Hello, Forever ... Grrrrr');

Why he say "Hello, Forever ... Grrrrr" forever forever forever....
Sorry about my english ....

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to