Results 1 to 4 of 4

Thread: NodeInterface.destroy eventually calls non existant TreeStore.remove

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    64
    Vote Rating
    2
      0  

    Default NodeInterface.destroy eventually calls non existant TreeStore.remove

    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.1.3 rev 548


    Browser versions tested against:
    • IE8


    Description:
    NodeInterface has the remove and destroy methods. From what I can tell, both of these end up calling the regular Model destroy method. This has a callback function with this line that will always get called:

    Code:
    store.remove(me, true);
    However, the TreeStore and the AbstractDataStore from which it inherits has *no* remove method. Instead, only Ext.data.Store has remove.

    Steps to reproduce the problem:
    • Create a TreePanel backed by a tree store, then call removeAll on the root node.


    The result that was expected:
    • Nodes are removed without exception


    The result that occurs instead:
    • error occurs when store.remove call is reached since it does not exist.


    I'm sorry I can't provide a test case, I'm a little busy and constructing a testable example would take more time than I have. It appears that if I call remove(false) or removeAll(false) to prevent the destroy code it works, and I don't think destroy in my case needs to be called. However, this still seems like a logic error in the code unless I'm mistaken.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Using 4.2.0 GA I do not get an error with store.remove is undefined. I get an error when it tries to build the sync call.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    64
    Vote Rating
    2
      0  

    Default

    Thank you for the response, that helps. It seems that 4.2 guards against this with this line of code:

    Code:
    // If the store has a remove (it's not a TreeStore), then
                        // remove this record from Store. Avoid Store handling anything by passing the "isMove" flag
                        if (store.remove) {
                            store.remove(me, true);
                        }
    I am guessing that 4.1.x will have no further patch releases and users are expected to migrate to 4.2, correct? If so then I will construct an override for this to patch it for now and then remove it for 4.2.

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Yes, development has moved on to 4.2.x
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

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