How to get the name of an extensible class

I have a couple of grids extending AbstractFormGrid. The presence of an object (which can be a grid or not), how to check whether this object extends AbstractFormGrid. I managed to get the class name of the object using Ext.getName (object) or object.selfName (), but I can not get the "parent" class.

+4
source share
2 answers

The this.superclass property will return the parent class.

And as you mentioned, this works:

 Ext.getClass(object).superclass.self.getName() 
+11
source

A simpler approach is to use the private property of $ className:

 object.superclass.$className 

Each class inherits this property from Ext.Base

0
source

All Articles