title: how to call controller function from outside controller function like global function in sencha touch
body: <p>How can I call function which is inside controller from out side controller function like might be phone gap call back function</p>
  
  <p>Here is the function defined out side the controller </p>
  
  <pre><code>  function onDeviceReady() {
      //do ALL your localstorage stuff here
      console.log('In onDeviceReady() function');
      somefunction();// this is not working
    }
  </code></pre>
  
  <p>Here is the controller class</p>
  
  <pre><code>     Ext.define('FCELB.controller.LoginController', {
          extend: 'Ext.app.Controller',
          config: {
              refs: {
                  username: '#username',
                  password: '#password'
              },
  
              }
  
          },      
  
          init: function () {
              console.log('Login controller');
              document.addEventListener("deviceready", onDeviceReady, false);
              //onDeviceReady();
          },
  
          somefunction:function(){
              //some functionality
          }
  
     });
  </code></pre>
  
  <p>How to call <code>somefunction()</code> from the above onDeviceready() function?</p>