News for hackers. Stuff that matters.
Re: by sisk on Sunday March 06, 2011 @11:47PM (#2296064)
I do the following a lot (setTimeout as a relevant example):

  setTimeout(
    (function(scope){
      return function(){scope.fire();};
    })(this), 500
  );
The short explanation is you return a function from an immediately-executing anonymous function that takes the current scope as a parameter.
Re: by thomasdavis on Sunday March 06, 2011 @11:58PM (#2296089)
I have used this method many times before also, added it as an alternative implementation on the site.