直接引入如下的js文件,会报如下错误:
container is null me.container = container.dom ? container : Ext.get(container) |
Ext.create.js
- // full class name
- var v_window = Ext.create('Ext.window.Window', {
- title:'hello',
- width: 600,
- height: 800
- // ...
- });
- v_window.show();
需要改成如下的形式:
- Ext.onReady(function(){
- // full class name
- var v_window = Ext.create('Ext.window.Window', {
- title:'hello',
- width: 600,
- height: 800
- // ...
- });
- v_window.show();
- });
------------------------------------------------------------------------------------
直接引入如下的js文件,会报如下错误:
window.show is not a function window.show(); |
Ext.create.js
var window = Ext.create('Ext.window.Window', {- title:'window5',
- width: 600,
- height: 100
- // ...
- });
- window.show();
需要改成如下形式:
- Ext.onReady(function(){
- var window = Ext.create('Ext.window.Window', {
- title:'window5',
- width: 600,
- height: 100
- // ...
- });
- window.show();
- });
-------------------------------------------------------------------------------
[Ext.Loader] Failed loading synchronously via XHR: 'myWin.js';(通过XHR同步加载myWin.js失败) It's likely that the file is either being loaded from a different domain or from the local file system whereby cross origin requests are not allowed due to security reasons. (文件不是从不同的域名加载就是从本地文件加载,由于跨域请求由于安全的原因是不允许访问)Use asynchronous loading with Ext.require instead.(使用Ext.require同步加载)
[在此错误处中断]
throw new Error("[Ext.Loader] " + errorMessage);
--------------------------------------------------------------------------------------
xtype:'这里写错了名字',就会报如下错误:
Uncaught TypeError: Cannot call method 'substring' of undefined
----------------------------------------------------------------------------------
- {xtype:'button',id:'create',text:'create',handler:function(){
- console.log("创建");
- }},
- {xtype:'button',id:'create',text:'create',handler:function(){
- console.log("创建");
- }}
id都是"create"
Ext.AbstractManager.register(): Registering duplicate id "create" with this manager
111