I'd be happy if you could explain to me why shout() keeps getting called, although it's supposedly "gone".
var myclass = new Class({
myid: "greatidea",
initialize: function(element) {
var shout = function() { alert(this.myid); };
shout.periodical(5000, this); // test debug
}
});
x = new myclass ();
alert(x);
x=null;
alert(x);
also see here http://mootools.net/shell/jhCBz/
Basically, I get the idea: the function gets its own registration, and is now independent of the object who called it. But I'd be happy to get a real explanation.
Thanks.