All the ExtJS documentation and examples I have read suggest calling superclass methods like this:
MyApp.MyPanel = Ext.extend(Ext.Panel, {
initComponent: f
I would simply change your code to:
var $cls = MyApp.MyPanel = Ext.extend(Ext.Panel, {
initComponent: function() {
// do something MyPanel specific here...
$cls.superclass.initComponent.call(this);
}
});
That way you only keep a single reference of your class name, now $cls. Only use $cls within your class methods and you'll be fine.