1.TypeError: this.addEvents is not a function
var win = new Ext.Window({
id:'my first window',
title:'my first extjs window',
width:300,
height:400,
layout:'fit',
autoLoad:{
url:'sayHi.html',
scripts:true
}
});
win.show();
this.addEvents is not a function 错误主要是由于没有new 引起的,小心检查一下是否在创建对象的时候忘记写new了?比如:
function buildWindow(){
}
Ext.onReady(buildWindow);
在第一行的时候如果没有写new就会出现这样一个错误!
2.