1、TypeError: alignToElement.getPageBox is not a function
alignToBox = alignToElement.getPageBox(), |
使用tooltip,如:
var newButton = {
id : 'new_Button',
xtype : 'button',
text : 'new',
ui : 'action',
handler : this.onNewNoteTap,
scope : this
};
Ext.create('Ext.Panel', {
html : '请在此输入标题',
left: 0,
padding: 10
}).showBy(newButton);
报错如下:
原因是:button不能以这种方式定义,必须以如下方式定义:
var newButton = Ext.create('Ext.Button', {
id : 'new_Button',
text : 'new',
ui : 'action',
handler : this.onNewNoteTap,
scope : this
});
2、TypeError: item.getId is not a function
return this.map.hasOwnProperty(item.getId());
xtype 定义不对,创建控件时用的“productList”,而控件定义时不是用的该名字!
4、Uncaught Error: [ERROR][Ext.Container#onFirstItemAdd] Adding a card to a tab container without specifying any tab configuration
在向tabpanel中添加子项时,子项中 title、iconCls这两个配置至少要指定一项,title是tab按钮上显示的文字信息,iconCls是tab按钮的图标。
5、在调用Ext.create()创建model时,console窗口不报错,但是程序也不往下走,添加断点监控,手动调用时,弹出not available的错误。
经检查发现是model中某个field的convert方法如下:
convert: function(value, record){
return Ext.Date.format(value, 'Y-m-d H:i');
}
但是我调用create方法原型如下: var tmpModel = Ext.create(model), 也就是说创建了一个空的model,此时convert方法的value为空,导致报错!