Results 1 to 9 of 9

Thread: autoEl Array Problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Vote Rating
    392
      0  

    Default autoEl Array Problem

    A backwards-compatibility issue I ran into. My code was wrong but it might help someone else...

    I had something like this and it worked fine in 4.0.7:

    Code:
    Ext.create('Ext.Component', {
        renderTo: Ext.getBody(),
    
        autoEl: [{
            cn: [{}, {}, {}, {}]
        }]
    });
    Doing the same with 4.1.0-beta-1 generates some totally nonsense HTML.

    The mistake is that my autoEl is an array. Get rid of the brackets and it works fine.

  2. #2
    Sencha - Community Support Team mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,023
    Vote Rating
    1334
      0  

    Default

    Bad skirtle! Docs do say String/Object
    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:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Vote Rating
    392
      0  

    Default

    Chastise away. I hate it when I make mistakes. I intend to spend my evening self-flagellating as a penitence. It's the only way I'll learn...

  4. #4
    Sencha - Community Support Team mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,023
    Vote Rating
    1334
      0  

    Default

    I will tease you I've made my fair share and then 100 other's share of mistakes. I'm just having some fun with you
    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:
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Posts
    46
    Vote Rating
    0
      0  

    Default

    And what about that ?
    Works fine in 4.0.7:

    Code:
    this.autoEl = {
                tag: 'span',
                cls: this.cls                                    // set the css class
            }
    In 4.1 beta it gives me :
    Code:
    <span cls style=" ....
    In 4.0.7 :
    Code:
    <span class="myclass" style="...

  6. #6
    Sencha User
    Join Date
    Nov 2010
    Posts
    46
    Vote Rating
    0
      0  

    Default

    It seems to work better like this:

    this.autoEl = { tag: 'span' }
    My app is still not availble with this release. Lot of fix to done.

Posting Permissions

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