Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在EXTJS4中使用Ext.define_Extjs4 - Fatal编程技术网

如何在EXTJS4中使用Ext.define

如何在EXTJS4中使用Ext.define,extjs4,Extjs4,我得到一个错误:dockedItems为null或不是对象。 我想知道当我定义一个定义EXTJS4类的类时应该做什么 Ext.define("com.yx.MyPanel", { extend: "Ext.panel.Panel", config: { title: "Clannad", width: 100, h

我得到一个错误:dockedItems为null或不是对象。 我想知道当我定义一个定义EXTJS4类的类时应该做什么

Ext.define("com.yx.MyPanel", {
                extend: "Ext.panel.Panel",
                config: {
                    title: "Clannad",
                    width: 100,
                    height: 100
                },
                constructor: function(config) {
                    this.initConfig(config);
                    this.callParent([config]);
                }
            });
            Ext.create("com.yx.MyPanel", {
                renderTo: Ext.getBody()
            });

我已经在下面的链接中解释了如何在ExtJS4中使用Ext.define

可能存在的副本