I have a small application created by Sencha Architect 2. I noticed several times already that I can very well override onLaunch of both Controller and Application object, the function is never called. I'm using trial version 2.0.0, build 412. Here is the application code:
Ext.Loader.setConfig({
enabled: true
});
Ext.application({
views: [
'MyContainer',
'MyGridPanel'
],
autoCreateViewport: true,
name: 'MyApp',
onLaunch: function() {
var container = Ext.getCmp ('glbContainer');
var cfg = [
{ dataIndex: 'ID', text: 'ID' },
{ dataIndex: 'DISPLAYNAME', text: 'Displayname' }
];
var theGridPanel = this.getComponent ('theGridPanel');
var config = [];
for (var jj=0; jj<cfg.length; jj++) {
var configElem = {};
configElem.xtype = 'gridcolumn';
configElem.dataIndex = cfg [jj].dataIndex;
configElem.text = cfg [jj].text;
configElem.width = 200;
config.push (configElem);
}
alert (config.length);
theGridPanel.reconfigure (config);
}
});