I'm having issues with override and config: attribute. When I put the config into the view code they work but SA doesn't allow for config items so I tried creating an override.
View Code that works:
Code:
Ext.define('MyApp.view.Portal', {
extend: 'Ext.container.Viewport',
config : {
title: "Hello World"
},
layout: {
type: 'border'
},
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
<additional code goes here>
]
});
me.callParent(arguments);
},
constructor: function(config) {
this.initConfig(config);
return this.callParent(arguments);
}
});
View code with override:
Code:
Ext.define('MyApp.view.Portal', {
extend: 'Ext.container.Viewport',
requires: [
'MyApp.view.override.Portal'
],
layout: {
type: 'border'
},
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
<additional code goes here>
]
});
me.callParent(arguments);
}
});
Override code that throws and error when run:
Code:
Ext.define('MyApp.view.override.Portal', {
override: 'MyApp.view.Portal',
config : {
title: "Hello World"
}
});
I get the following error:
TypeError: configNameCache[name] is undefined
| [IMG]chrome://firebug/content/blank.gif[/IMG] |
initializedName = configNameCache[name].initialized; |
I've tried the override code with and without:
Code:
constructor: function(config) {
this.initConfig(config);
return this.callParent(arguments);
}
I'm new to Ext Js and the Sencha Architect. What am I missing? Thanks in advance.