PDA

View Full Version : Overring method of base class with subclass in Extjs4.1



Richa Garg
8 Feb 2013, 4:28 AM
There is Class A ( base class) and Class B( sub class) and function A().

Function A() is in both Class A and Class B.
Class B extend Class A.
When we call function A() in Class A , it will go to function A() in Class B and execute it.

In Sencha Docs , its given that for this we need to add attribute 'override':'Class A' in Class B which will execute the function A() in subClass Class B.

Since we need to extend Class A in Class B we cannot override Class A in Class B . So is there any other way to implement this functionality.

sriram139
8 Feb 2013, 9:02 AM
I think this one will help you:
http://docs.sencha.com/ext-js/4-1/#!/api/Ext-method-override