[Proto-Scripty] Re: Binding class method problem with this

2010-09-20 Thread kstubs
Back to happy. All is working. Thanks again TJ, and I love when things work as expected! I have been pulling my hair out all weekend! Karl.. On Sep 19, 11:25 pm, kstubs kst...@gmail.com wrote: Oh my gosh!  OK, I never considered that bind() returns a function. Wow... that changes everything.

[Proto-Scripty] Re: Binding class method problem with this

2010-09-19 Thread kstubs
Does it mean: if I am using a member variable (ie., this.active = false;) who's value is true when I'm over the banner and if true then show the banner after specific wait time but if I cancel the variable because of another event, like mouseover the document, the method bound to the show() event

[Proto-Scripty] Re: Binding class method problem with this

2010-09-19 Thread kstubs
I am attaching a self-contained test page. This demonstrates an issue with bind(). Note test ONE fails. All other tests pass as expected. Test one is: this.out.bind(this,'ONE '); This fails. Interestingly, if I add a delay to this, as in test TWO, THREE, it works. So this works:

[Proto-Scripty] Re: Binding class method problem with this

2010-09-19 Thread T.J. Crowder
Hi, ...I am still confused on the behavior of the test javascript code. Your first call, `_test.show('outer', 0);`, is processed like this: 1. Log the call via console.log 2. Since itt == 0, go into the first if block 3. Do a `bind` that's completely ignored because it's never called or