View Full Version : Ext.ComponentQuery.query() not working

7 Jan 2011, 1:31 PM
Hi all,

Followed the documentation for the class and I tried to use this method to lookup a bunch of checkboxes ... Ext.ComponentQuery.query('#container .checkboxfield') .. fails on line 5935 within debug-w-comments file. -

// no root, use all Components in the document
if (!root) {
workingItems = Ext.ComponentMgr.all.items.slice();
Error - Uncaught TypeError: Cannot call method 'slice' of undefined

I reverted to a different way of calling (specifying the root) to avoid executing the above codepath.

Seems like this is a bug? What am I doing wrong?


3 Feb 2011, 5:21 PM
I got the same behavior. It does appear to be a bug. Ext.ComponentMgr is storing the reference to managed components inside map, not inside a MixedCollection. Therefore, the property items of all does not exist.

9 Jul 2011, 4:49 PM
I submitted a bug against this. Thanks for reporting it.

7 Sep 2012, 4:45 AM
Was this solved? I get the exact same error a year later in some ST1 code. Also is there a public bug tracker?