PDA

View Full Version : TreeStore - getModifiedRecords problem



ionut.rachita
31 Aug 2009, 7:52 AM
Hello,
I'm doing some modifications over a TreeStore, removing and adding items. After doing this I'm retrieving the list of modified records with getModifiedRecords, and I get an empty list.

Throwing a quick look over the TreeStore class I saw that "modified" variable is used only in removeAll. From my impression after modifing a treeStore is not possible to retrieve the modifications.

So my question is, how can i retrieve the modified records, or more precisely if a treestore was modified? Is there a way to do this, or this is a bug?

Regards,
Ionut

ionut.rachita
1 Sep 2009, 12:25 AM
I've posted in the bugs subforum about this issue, along with a code sample.

Feltros
1 Sep 2009, 3:09 AM
I've not used the TreeStore myself but could you not make your own class extending TreeElement (or whatever it is) and override modify/setValue method and set the modified field yourself?
@Override
modify(modification a){super(a); this.modified=true;}

It does however sound like a bug to me, or maybe just a design decision by the makers.