title: How to wait until all stores are loaded in ExtJs?
body: <p>I have a set of combo boxes that are driven by five stores and I want to fire a function once all the stores are completely loaded.  What is the recommended way of doing this?  I could do something like this but it feels kludgy:</p>
  
  <pre><code>var store1Loaded = false;
  var store2Loaded = false;
  
  store1.on('load', function(){
      store1Loaded = true;
  });
  
  store2.on('load', function(){
      store1Loaded = true;
  });
  
  
  store1.load();
  store2.load();
  
  function WaitForFunction()
  {
      if (!store1Loaded || !store2Loaded)) {
         setTimeout( WaitForFunction, 100);
         return;
      }
      AllStoresLoaded();
  }
  
  function AllStoresLoaded(){
        //Do Something
  }
  </code></pre>