2011-02-22 155 views
0

以下是在延伸类的initComponent:复选框“检查”事件

this.checkBoxArray[0].on('check(this.checkBoxArray[0]', false), this.enableAllCheckboxes, this); 

它不执行this.enableAllCheckboxes()unclicking的复选框之后。

回答

2

你的代码应该是...

ExtJS的3.X:

this.checkBoxArray[0].on('check', this.enableAllCheckboxes, this); 

ExtJS的4.x版:

this.checkBoxArray[0].on('change', this.enableAllCheckboxes, this); 
+0

它不适用于ExtJS 4.x,哟你可以使用'更改'事件。 – 2013-05-14 09:43:49

-2

添加()的函数的第二个参数

+0

nope,on()方法的第二个参数是处理程序的名称... – JamesHalsall 2011-02-22 19:25:45

相关问题