title: Javascript Scope problem with OAuth
body: <p>I was wondering how to call <code>waitForPin</code> in this line:</p>
  
  <pre><code>setTimeout(this.waitForPin, 100);
  </code></pre>
  
  <p>File:</p>
  
  <pre><code>// namespace our code
  window.App = {};
  
  // my class (no Class.create in JQuery so code in native JS)
  App.Something = function() {
  };
  
  // add functions to the prototype
  App.Something.prototype = {
  
      // automatically called
      initialize: function(name, sound) {
  
          this.wnd;
  
          this.config = {
              // some vars
          };
  
          this.oauth = new OAuth(this.config);
  
          // attach event handlers, binding to 'this' object
          $("#request_token").click($.proxy(this.request_token, this));
  
      },
  
      request_token: function() {
          this.oauth.fetchRequestToken(this.openAuthoriseWindow, this.failureHandler);
      },
  
      openAuthoriseWindow: function (url) {
          this.wnd = window.open(url, 'authorise');
          setTimeout(this.waitForPin, 100); // how to call waitForPin here?
      },
  
      waitForPin : function (scope) {
          // do sth
      }
  
  };
  </code></pre>