Results 1 to 2 of 2

Thread: [2.1.0-b3] Tree Store method removeAll() throws Object - has no method 'getRootNode'

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3480 in a recent build.
  1. #1

    Default [2.1.0-b3] Tree Store method removeAll() throws Object - has no method 'getRootNode'

    REQUIRED INFORMATION




    Ext version tested:
    • ST 2.1.0-b3

    Browser versions tested against:
    • Problem is browser independent (Chrome, Safari, iOS, Android)

    DOCTYPE tested against:
    • HTML 5

    Description:
    In ST API Docs we can read:
    getRootNode( node ) : Ext.data.Model
    This method has been

    DEPRECATED
    http://docs.sencha.com/touch/2-0/#!/...od-getRootNode

    But your method "removeAll" is still using one: (this is the only place in the code that it exists)
    Code:
    removeAll: function() {
           this.getRootNode().removeAll(true);
           this.callParent(arguments);
    },
    That throws:
    Uncaught TypeError: Object [object Object] has no method 'getRootNode'

    Steps to reproduce the problem:
    • Call removeAll function on a TreeStore

    The result that was expected:
    • All items removed

    The result that occurs instead:
    • Uncaught TypeError: Object [object Object] has no method 'getRootNode'



    HELPFUL INFORMATION




    Debugging already done:
    • some

    Possible fix:
    Change to:
    Code:
    removeAll: function() {        this.getRoot().removeAll(true);        this.callParent(arguments);    },
    Additional CSS used:
    • only default ext-all.css
    • custom css (include details)

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

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

Posting Permissions

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