title: Sencha Touch 2 get record
body: <p>In my controller, I want to get a random record from the localstorage and display in the view, how can I do that?</p>
  
  <p>In my config I have:</p>
  
  <pre><code>stores: ['Items']
  </code></pre>
  
  <p>In my function I have :</p>
  
  <pre><code>var mystore = (this.getStores())[0];  
  var index = this.getRandomInt(0, mystore.totalCount() -1);
  var nextItem = mystore.getAt(index);
  </code></pre>
  
  <p>but it's stuck at the first line</p>
  
  <p>Maybe there is an easier way?</p>