Ext.Loader.setConfig({ enabled:true, paths: { 'Ext' : 'lib/extjs/src', 'Ext.ux' : 'lib/extjs/examples/ux', 'Samp' : 'lib/sampjs' } }); Ext.application({ requires: [ 'treps.Constants', 'treps.Messages', 'treps.model.Session', 'treps.LoadMask' ], name: 'treps', appFolder: 'app', controllers: ['Application.Application','Steps.StepsManager','Application.Help.Help'], autoCreateViewport: true, constructor: function() { //Load Ext.direct APIs Ext.Loader.loadScript({ url: treps.Constants.DIRECT_API, scope: this, onLoad: function() { Ext.direct.Manager.addProvider(Ext.app.REMOTING_API); TREPSAction.getKernelVersion(function(result, event) { var appController = treps.app.getController('Application.Application'); if (result && result.success) { treps.model.Session.set('kernelVersion',result.status); appController.setVersion(result.status); } } ); }, onError: function() { treps.Messages.showError("Server APIs not reachable!"); } }); this.callParent(arguments); } });