If I have an application which contains panels created with Ext.create, and those panels have items which are created with both Ext.create and configuration objects, I get a panel whose interface is completely unclickable and doesn’t respond to any interaction.
I’ve create a sample JSFiddle which illustrates the issue. Click the “TEST” button to see an example of this failure.
You can’t do component creation at class definition time. That is, using
Ext.createdirectly inside config object ofExt.define:Even if this would work, it would result in all instances of Panel1 sharing one Panel2 instance.
Instead you should do your component creation at initialization time:
The
initializemethod is a good place to do any kind of extra work you want to do every time you create an instance of your component class.callParentis there because we overrideinitializeof a parent class which might have some of its own logic in there which we want to keep.