Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.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
Extjs &引用;renderTo“;打破死刑_Extjs_Extjs4 - Fatal编程技术网

Extjs &引用;renderTo“;打破死刑

Extjs &引用;renderTo“;打破死刑,extjs,extjs4,Extjs,Extjs4,我想在应用程序启动时在页面顶部呈现一个工具栏。 当页面中包含ext-all-dev.js时,在viewport.js中运行以下命令会起作用。但是当我使用ext-dev.js时,它会抛出异常。uncaughttypeerror:undefined不是一个函数 Ext.create("Ext.toolbar.Toolbar", { renderTo: document.body, defaultType: 'button', items: [{text: 'foo'}]

我想在应用程序启动时在页面顶部呈现一个工具栏。 当页面中包含
ext-all-dev.js
时,在
viewport.js
中运行以下命令会起作用。但是当我使用
ext-dev.js
时,它会抛出异常。
uncaughttypeerror:undefined不是一个函数

Ext.create("Ext.toolbar.Toolbar", {
    renderTo: document.body,
    defaultType: 'button',
    items: [{text: 'foo'}]
    });
怎么了?在控制台中运行上述代码也可以同时使用
ext-dev.js
ext-all-dev.js
文件。异常堆栈是:

Uncaught TypeError: undefined is not a function AbstractComponent.js?_dc=1398852700374:170
Ext.define.statics.updateLayout AbstractComponent.js?_dc=1398852700374:170
Ext.define.updateLayout AbstractComponent.js?_dc=1398852700374:3319
Ext.define.afterRender Renderable.js?_dc=1398852701043:195
Base.implement.callParent ext-debug.js:4266
Ext.define.afterRender Component.js?_dc=1398852699982:435
Ext.define.finishRender Renderable.js?_dc=1398852701043:458
Ext.define.render Renderable.js?_dc=1398852701043:784
Ext.define.constructor AbstractComponent.js?_dc=1398852700374:1231
Base.implement.callParent ext-debug.js:4266
Ext.define.constructor Component.js?_dc=1398852699982:377
constructor ext-debug.js:4897
(anonymous function) VM11066:3
Ext.ClassManager.instantiate ext-debug.js:5485
(anonymous function) ext-debug.js:2112
(anonymous function) Viewport.js?_dc=1398852703350:51  

您发布的代码无效。这段代码不正确:
items:[text:'foo']
我无法想象有效的javascript。第51行的Viewport.js中有什么内容?Ext.create()函数?@A1rPun
renderTo:document.body,