Ext.extend
- Ext.extend is used to extend or inherit from classes which already exist
- Generic Pattern:
var SubClass = function() {
SubClass.superclass.constructor.call(this);
};
Ext.extend(SubClass, BaseClass, {
newMethod : function() {},
overriddenMethod : function() {}
});
- SubClass extends BaseClass and overrides overridenMethod and adds newMethod
- All existing methods, events and properties of BaseClass are now also available on SubClass
- A special property named superclass will exist in SubClass which points to BaseClass