PDA

View Full Version : How to override / extend Node.Interface with new function?



jchau
21 Nov 2012, 11:50 AM
I want to add a new helper method to NodeInterface. Normally, I would just do Ext.override or classname.override but it doesn't seem to work for NodeInterface.




Ext.data.NodeInterface.override({
myFunction: function () {
// do some cool stuff

}
});

vietits
21 Nov 2012, 5:18 PM
Did you try the code below?


Ext.define('Override.data.NodeInterface', {
override: 'Ext.data.NodeInterface',
myFunction: function(){
...
}
});