title: Sencha Touch / ExtJS: how to store a variable for later use?
body: <p>Is it possible for one method in a class to store a value that another method can use later on?</p>
  
  <p>For example, here's a snippet from one of my Ext.Panel instances:</p>
  
  <pre><code>app.views.EstablishmentDetail = Ext.extend(Ext.Panel, {
  dockedItems: [{
      xtype: 'toolbar',
      title: 'View establishment',
      items: [
          {
              text: 'Back',
              ui: 'back',
              listeners: {
                  'tap': function () {
                      Ext.dispatch({
                          controller: app.controllers.establishments,
                          action: 'index',
                          animation: {type:'slide', direction:'right'}
                      });
                  }
              }
          },
          {xtype:'spacer'},
          {
              id: 'Map',
              text: 'Map',
              ui: 'action',
              listeners: {
                  'tap': function () {
                      Ext.dispatch({
                          controller: app.controllers.establishments,
                          action: 'showMap',
                          id: this.record.getId(),
                          data: this.record.data,
                          record: this.record
                      });
                  }
              }
          }
      ]
  }],
  styleHtmlContent:true,
  scroll: 'vertical',
  </code></pre>
  
  <p>I'd like to have a variable in this class-- call it 'myVariable' that I can pass to a property in the dispatcher you see above, 'showMap'.  (I'd like to initialize its value from another method call.)</p>
  
  <p>But in all the examples I've seen on ExtJS, when you subclass something like Ext.Panel, it seems you can only refer to pre-existing properties (like 'title') or create new functions.  Is there a mechanism for saving a variable during one method call, then using that variable in a different method?</p>