PDA

View Full Version : [FIXED] Cycle button destroy() method crashes



Seboss
4 Mar 2011, 6:15 AM
When calling the destroy() method of a cycle button, I get the following error in Ext.menu.MenuManager


Uncaught TypeError: Object [object Object],[object Object] has no method 'remove' ext-all-debug.js:56756:Ext.define.unregisterCheckable

It's fairly easy to reproduce:


Ext.create("widget.cycle", {
menu: {
items:[{text:"foo"},{text: "bar"}]
}
}).destroy();




EDIT:
I guess the correct line should be:

(ext-all-debug.js:56756)
Ext.Array.remove(groups[groupId], menuItem);
instead of:

groups[groupId].remove(menuItem)
which looks like Ext JS 3 era code.