Results 1 to 2 of 2

Thread: Alias for Ext.ComponentQuery.query()

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Vote Rating

    Default Alias for Ext.ComponentQuery.query()

    Ext.ComponentQuery.query() is an amazingly powerful and useful function. I've been using it all over the place. The only problem with it is that it's a pretty long name for something that's used so often - in jQuery, for example, a roughly analogous function is aliased to $() for convenience.

    So, since I couldn't find anything in PR3 regarding an alias for this function, I created my own:

    PHP Code:
    /*    Create alias "Ext.cq()" for "Ext.ComponentQuery.query()".

            var applyButton = Ext.cq('[action="apply"]', this)[0];
    Ext.cq Ext.Function.alias(Ext.ComponentQuery'query'); 
    Perhaps the Sencha team would consider including a similar alias in the final version of Sencha Touch 2?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Each component has convenient methods to do this... child, down, query, up
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts