News for hackers. Stuff that matters.
Re: by travisglines on Sunday March 06, 2011 @11:43PM (#2296051)
Solid example, I frequently find myself saying something to the effect of:

    var this_autobot = this;
    async_function = function(){
      this_autobot.fire();
    }
Re: by joshd on Sunday March 06, 2011 @11:48PM (#2296070)
I usually use `that`. I've seen examples use `self`, but that could potentially conflict with `window.self` in the browser.

    var that = this;
    return function(){
      that.fire();
    }
Re: by Johngibb on Monday March 07, 2011 @12:15AM (#2296115)
I've used $this before