code: function(card) {
          var me = this,
              previous;
  
          card = me.getComponent(card);
          if (card) {
              previous = me.getActiveTab();
  
              if (previous !== card && me.fireEvent('beforetabchange', me, card, previous) === false) {
                  return false;
              }
  
              // We may be passed a config object, so add it.
              // Without doing a layout!
              if (!card.isComponent) {
                  Ext.suspendLayouts();
                  card = me.add(card);
                  Ext.resumeLayouts();
              }
  
              // MUST set the activeTab first so that the machinery which listens for show doesn't
              // think that the show is "driving" the activation and attempt to recurse into here.
              me.activeTab = card;
  
              // Attempt to switch to the requested card. Suspend layouts because if that was successful
              // we have to also update the active tab in the tab bar which is another layout operation
              // and we must coalesce them.
              Ext.suspendLayouts();
              me.layout.setActiveItem(card);
  
              // Read the result of the card layout. Events dear boy, events!
              card = me.activeTab = me.layout.getActiveItem();
  
              // Card switch was not vetoed by an event listener
              if (card && card !== previous) {
  
                  // Update the active tab in the tab bar and resume layouts.
                  me.tabBar.setActiveTab(card.tab);
                  Ext.resumeLayouts(true);
  
                  // previous will be undefined or this.activeTab at instantiation
                  if (previous !== card) {
                      me.fireEvent('tabchange', me, card, previous);
                  }
              }
              // Card switch was vetoed by an event listener. Resume layouts (Nothing should have changed on a veto).
              else {
                  Ext.resumeLayouts(true);
              }
              return card;
          }
      }
docs: Makes the given card active. Makes it the visible card in the TabPanel's CardLayout and highlights the Tab.
  @param {String/Number/Ext.Component} card The card to make active. Either an ID, index or the component itself.
  @return {Ext.Component} The resulting active child Component. The call may have been vetoed, or otherwise
  modified by an event listener.