Results 1 to 2 of 2

Thread: Alias for Ext.ComponentQuery.query()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  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 User 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
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Posting Permissions

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