In Jquery theres a function
$(document).ready(function (){..}
Is there such a thing in Sencha Touch 2?
I’m aware of
Ext.Setup({ onReady: function () {...} })
However I can only call Ext.Setup once. If I have multiple views how would I take care of this? I would like a function to load when a view is loaded. Do I have to this via a controller? Can I use a snippet of code injected into the index.html (The platform is built on node and requires this)?
Inside of your controller that requires the view just add an init: function() { //do something }, extjs will take care of the rest… usually if your trying to call a function that requires the view to be loaded, then add the ‘painted’ listener to your view and it will be called when the view is rendered