Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Jan 2008
    Posts
    109
    Vote Rating
    8
    KajaSheen is on a distinguished road

      0  

    Default ComponentQuery fails when xType contains . (dot)

    ComponentQuery fails when xType contains . (dot)


    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.1.2a

    Description:
    • When the class alias contains additional dots (widget.ux.newcomponent) the ComponentQuery (i.e. down) fails.

    Test Case:

    Using the examples/dynamic.html execute the following code:

    PHP Code:
    Ext.define('Ext.ux.Foo', {
        
    extend'Ext.form.field.Text',
        
    alias'widget.ux.foo'
    });

    Ext.define('Ext.ux.Bar', {
        
    extend'Ext.form.field.Text',
        
    alias'widget.uxbar'
    });

    Ext.getCmp('simpleForm').add({xtype:'ux.foo'}, {xtype:'uxbar'});
    console.log(Ext.getCmp('simpleForm').down('ux.foo'));
    console.log(Ext.getCmp('simpleForm').down('uxbar')); 
    Output in console:
    PHP Code:
    null
    Ext
    .ux.Bar 

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,812
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The issue I see is a period means something to ComponentQuery. This selector:

    '.textfield'

    Is the same as

    'textfield'

    So how can it know what you want to happen when you use a period? IMO documentation needs to reflect this to warn people.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    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 services@sencha.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.

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2008
    Posts
    109
    Vote Rating
    8
    KajaSheen is on a distinguished road

      0  

    Default


    Completly fine as a solution. Should be reflected in the documentation for alias definition and ComponentQuery. Thanks a lot.

  4. #4
    Ext JS Premium Member Ron Howard's Avatar
    Join Date
    May 2011
    Posts
    115
    Vote Rating
    3
    Ron Howard is on a distinguished road

      0  

    Default


    Couple solutions are posted here on the 3rd page.

    http://www.sencha.com/forum/showthre...l=1#post599204

Thread Participants: 2