直接引入如下的js文件,会报如下错误:

container is null

me.container = container.dom ? container : Ext.get(container)

 

  1. // full class name 
  2. var v_window = Ext.create('Ext.window.Window', { 
  3.     title:'hello'
  4.     width: 600, 
  5.     height: 800 
  6.    // ... 
  7. }); 
  8. v_window.show(); 

需要改成如下的形式:

  1. Ext.onReady(function(){ 
  2.  
  3.  // full class name 
  4.  var v_window = Ext.create('Ext.window.Window', { 
  5.      title:'hello'
  6.      width: 600, 
  7.      height: 800 
  8.     // ... 
  9.  }); 
  10.  v_window.show(); 
  11. }); 

------------------------------------------------------------------------------------

 直接引入如下的js文件,会报如下错误:

window.show is not a function

window.show();

Ext.create.js


  1. var
     window = Ext.create('Ext.window.Window', { 
  2.      title:'window5'
  3.      width: 600, 
  4.      height: 100 
  5.     // ... 
  6.  }); 
  7.  window.show(); 

需要改成如下形式:

  1. Ext.onReady(function(){ 
  2.  var window = Ext.create('Ext.window.Window', { 
  3.      title:'window5'
  4.      width: 600, 
  5.      height: 100 
  6.     // ... 
  7.  }); 
  8.  window.show(); 
  9. }); 

-------------------------------------------------------------------------------

 

[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 

----------------------------------------------------------------------------------

  1. {xtype:'button',id:'create',text:'create',handler:function(){ 
  2.    console.log("创建"); 
  3. }}, 
  4. {xtype:'button',id:'create',text:'create',handler:function(){ 
  5.    console.log("创建"); 
  6. }} 

id都是"create"

Ext.AbstractManager.register(): Registering duplicate id "create" with this manager

111