28 May 2011 6:29 AM #1
Would it be possible to add Ext.queryCmp() as a shortcut for Ext.ComponentQuery.query()?
var panelsArray = Ext.ComponentQuery.query('panel'); // long form var panelsArray = Ext.queryCmp('panel'); // shortcut
28 May 2011 5:02 PM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
I personally don't think this is needed. You have the up, down and query methods on each Component that should suffice for almost every situation.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
28 May 2011 5:48 PM #3
OK... Search the Ext code base... Ext.ComponentQuery.query is used in many places... if you used the shorter form, you could save a few bytes
31 May 2011 7:41 AM #4
Agree with Les,
For consistency and the same reason Ext.getStore exists.
Also why is it not part of ComponentManager in a method called query?
Wouldn't that make it more consistent with the other managers storeManager, windowManager, etc..?
16 Jan 2014 8:06 AM #5
19 Nov 2015 1:24 PM #6