PDA

View Full Version : Override a class property



bulletsoul
7 Oct 2012, 10:07 PM
I have this defined Font class where the property color's default value is 'FFFFFF'.

Ext.define('MyFontClass',{
color: 'FFFFFF'
});
I have instantiated it in another class and I want to override the default color and set it as '000000'. How do I do that?

I tried doing this but it's not working:

Ext.define('AnotherClass',{
anotherClassColor: new MyFontClass({color:'000000'})
})

bulletsoul
7 Oct 2012, 10:46 PM
Dumb me. Constructor's the answer.