You found a bug! We've classified it as TOUCH-3629 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,494
    Vote Rating
    57
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default Ext.get contract broken

    Ext.get contract broken


    The contract of Ext.get is to 'get' an element from the DOM. Seems broken to me:

    Code:
    Ext.getBody().setHtml('<div id="foo">CRAP</div>');
    console.log(Ext.get('foo').dom.innerHTML);            >>"CRAP"
    
    Ext.getBody().setHtml('<div id="foo">AWESOME</div>');
    
    console.log(Ext.get('foo').dom.innerHTML)   // >> "CRAP"
    Cache is not busted as I overwrite some element. Docs say this should work.

    http://docs.sencha.com/touch/2-0/#!/api/Ext-method-get

    Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,119
    Vote Rating
    453
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3

  4. #4

  5. #5
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,119
    Vote Rating
    453
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    This bug report is still open. Has not been worked on yet.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

    When posting code, please use BBCode's CODE tags.

  6. #6

  7. #7
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,494
    Vote Rating
    57
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default


    Coming up on 6 months for this, can we please just get it fixed? Still broken in 2.2. Ext.get just _has_ to work according to docs, imagine if in jQuery you could not trust

    Code:
    $('.foo')
    I think that's kind of a critical one.