I'm working with the Prototype JS library classes, which I'm really liking. But I ran into one stumbling block, Binding. In JS the scope in which your function can be called can change and as such the 'this' object can change. The main places this can happen is call back functions for events or anytime anonymous methods are used. Justin Palmer explains it really well here.
$('console').observe('click', _prompt.focusLine.bindAsEventListener(_prompt));
I'm Dusty Candland a software developer in Colorado.
Email