Hybrid View

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    39
    Vote Rating
    0
    ionut.rachita is on a distinguished road

      0  

    Question [2.0 Trunk] Bug in TreeStore when inserting a new item?

    [2.0 Trunk] Bug in TreeStore when inserting a new item?


    Hi,
    I'm trying to insert a new TreeItem at a specific index by modifying the TreeStore. The problem is that the new item is added as a last child instead of the specified position.

    The TreeStore has the setMonitorChanges set to true, and when inserting the new item I create a ChangeEvent and call notify:
    Code:
    ChangeEvent evt = new ChangeEvent(Add, this);
    evt.setParent(this);
    evt.setItem(child);
    evt.setIndex(index);
    notify(evt);
    Now, in the TreeStore the onModelChange will execute, and the ChangeEventSource.Add will be chosen. The add method will insert the new child using as index the number of children under the given parent instead of the index from ChangeEvent:
    Code:
    insert(parent, item, getChildCount(parent), addChildren);
    (TreeStore, line 186).

    My question is what is the solution to insert a new treeItem at a specific position? Should the TreeStore be modified so that it takes into consideration the index set in the ChangeEvent?

    Regards,
    Ionut

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar