Suppose I am extending a standard Sencha ExtJS 4 widget/component, and I found a bunch of things that don\'t work the way I want them to, or perhaps they are just broken and
Override the functions which you think are not working correctly or the way you want it to work
Example
Ext.define('MyApp.store.TreeGridStore', {
extend: 'Ext.data.TreeStore',
getTotalCount : function() {
if(!this.proxy.reader.rawData) return 0;
this.totalCount = this.proxy.reader.rawData.recordCount;
return this.totalCount;
},
....
In the above example I want the getTotalCount function to calculate the count differently, so I extended the treestore and overrided the method.