2011-02-22 107 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