PDA

View Full Version : override statics



art.dev.ext
28 Mar 2013, 11:41 PM
Hi !
I need to patch Ext.data.NodeInterface.collapseChildren statics method.

I tried many things with no success.

Is it possible to override 'statics' and how can I achieve doing this ?

Thank you
r@ge

mitchellsimoens
31 Mar 2013, 6:53 AM
Ext.define('MyClass', {
statics : {
foo : 'bar',
bar : 'foo'
}
});

Ext.define('Override.MyClass', {
override : 'MyClass',

statics : {
foo : 'changed'
}
});

console.log(MyClass.foo);
console.log(MyClass.bar);

art.dev.ext
3 Apr 2013, 2:57 AM
Many thanks ! that's what I need !