title: Scoping issue with PhoneGap and Sencha touch
body: <p>I'm having issues getting some scoping right with the below app. by the time I call this.fireEvent I'm no longer scoped in my app, but rather the document window.</p>
  
  <p>Any ideas?</p>
  
  <pre>DN.App = Ext.extend(Ext.Panel, {
      initComponent: function() {     
          document.addEventListener("backbutton", this.backKey, true);
          DN.App.superclass.initComponent.call(this);     
     },
  
      setActivePanel: function(){
          //global handler for switching panels
      },
  
      backKey: function(){
          var prev = DN.App.prevPanel[DN.App.prevPanel.length-1];
          DN.App.prevPanel.pop();
  
          //This handles the switching of panels, but 'this' is scoped to html document at this point
          this.fireEvent('setActivePanel',prev);
      }
  });</pre>
  
  <p><strong>Found an answer</strong>
  Bah, I worked at this for a couple hours before posting then figure it out 8 minutes later. I tried using <code>DN.App.fireEvent</code> but that also didn't work. I realized then that DN.App was just the class I made, not the actual object. In another file I call it as <code>DNApp = new DN.App();</code> After seeing that I tried <code>DNApp.fireEvent</code> and it worked great.</p>