ExtJS 4.0 - Class system, object inheritance and config

Recently we've started using the new Ext-JS 4.0 class system.

one of the obstacles I came across with was using the configuration while making inheritance.

On most of the examples in the web - it works seamlessly perfect.
but what happens when you try to extend an existing object?
for example, 'Ext.panel.Panel' ?

Suddenly - weird stuff happens and it doesn't work any longer.

So for example:
Ext.define('ProductionMap.popup.serverExplorer', {
extend: 'Ext.panel.Panel',

config: {
ParameterConfig: '',

constructor: function (cfg) {
return this;

initComponent: function () {

will give an error.
took me an hour to figure it out - but I found the solution and it's REALLY simple.
It's all about the constructor:
instead of that code, use:

constructor: function (cfg) {
return this;

and kaboom - works like a charm :)


No comments:

Natural Language Processing :: A beginner’s (brief) guide for working on NLP problems

This article  was written for the Data Science Society's Datathon held on February 2018, as an answer to questions from the participant...