you've simplified too much, as you're example would work ;)

On Dec 15, 2008, at 17:14, Itay Moav wrote:

Greetings.

I try to attach as an event handler a method of a class, and I am missing something. Here is what I try (simplified example)
var X=new Class({
    initialize: function(Elm) {
         Elm.addEvent('click',this.aclick);
    },
    aclick: function(){
             alert('x');
    }
});

I get :

C.call is not a function
removeEvent()()mootools...ressed.js (line 176)
if(C.call(I,J)===false){J.stop();}};}thi...eve("events");if(!A||! A[C]){return this;


--
Jan - MooTools comitter
twitter/blog: http://kassens.net

Reply via email to