I'd add that using self or that is totally fine, faster, and occasionally more elegant.
Sent from my iPhone On Apr 30, 2011, at 9:30 AM, Christoph Pojer <[email protected]> wrote: > And to ease with that you can use Class.Binds from PowerTools! > http://cpojer.net/PowerTools/#! > > this.bound('method') will always return the same reference, so you can do: > > element.addEvent('click', this.bound('clickHandler')); > > element.removeEvent('click', this.bound('clickHandler')); > > This circumvents manually defining a this.bound = {…} object.
