PDA

View Full Version : Setting configs



Dumas
30 Jul 2013, 2:56 PM
Hello,

why does this return 'b' and not 'a' in Ext JS 4.2?

Ext.define('MyClass', {
myConfig: 'b'
});
var a = Ext.create('MyClass', {
myConfig: 'a'
})


a.myConfig

Thanks,
Roland

Dumas
30 Jul 2013, 4:13 PM
Configs are not by default applied to the class, following works:


Ext.define('MyClass', {
myConfig: 'b',
constructor: function(config) {
Ext.apply(this, config);
},
});