title: Class Member becomes undefined
body: <p>I am quite new to TypeScript and I experience a strange problem at the moment. I create an instance of my main class when the document is ready, using JQuery.</p>
  
  <pre><code>var main: MainApp;
  $(document).ready(function () {
     main = new MainApp();
  });
  </code></pre>
  
  <p>The simplified <em>MainApp</em> Class:</p>
  
  <pre><code>class MainApp {
     // Helper Objects
     net: AppNetworking;
     urlHelper: UrlHelper;
     cat: Category;
  
     // Construction
     constructor() {
        this.net = new AppNetworking();
        this.urlHelper = new UrlHelper();
     }
  
     // Ajax Callback with Data needed to initialize the "cat" object
     private AjaxCallback(categoryData){
        this.cat = new Category(categoryData);
     }
  
     // Event Handler for an HTML-Element
     // As it would be called anonymously in JS I decided to make it a static function
     static onClickSendButton(): void{
        // Using some members of the MainApp
        var hostUrl: string = main.urlHelper.getQueryStringParam("HostUrl");
  
        if (main.cat.isValidCategory()) {
           main.sendCategory();
        }
     }
  
     sendCategory(): boolean {
        // Some logic to send data via AJAX
     }
  }
  </code></pre>
  
  <p>The function is being registered to the <em>onClick</em> Event of a Button on construction of the <code>MainApp</code> Class.</p>
  
  <pre><code>$("#btnSendCat").click(MainApp.onClickSendButton);
  </code></pre>
  
  <p>When the function <code>onClickSendButton()</code> gets called, it produces the error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'isValidCategory' of undefined
  </code></pre>
  
  <p>When debugging, the <code>urlHelper</code> Instance is defined, but the <code>cat</code> Instance is undefined. As I do not touch the instance <code>cat</code> anywhere in my application, I'm really confused how it is undefined. Also when checking the <code>main</code> variable all members are defined!</p>
  
  <p>Am I doing anything illegal here? Could there be issues with that code?</p>