0 Replies Latest reply on Jul 3, 2008 2:15 PM by Natrixia

    Reseting dataprovider

    Natrixia
      In an attempt to prevent dissapearing scrollbars in flex 2.0.1 I implemented Deepa Subramaniam's solution via a dataProvider found on The Following blog. This issue is also a documented Adobe bug a similar workaround to which can be found here. I tried implementing Deepa's solution (take a look at his code here) and changed it so that the method addTreeChildren is inside of a object that extends Tree. The most important part is the function addTreecChildren that goes as follows:

      desc.removeChildAt(xmlCollection, xmlData.node, 0);
      for each(var nchild:XML in newData){
      desc.addChildAt(xmlCollection, nchild, 1);
      }
      Where desc is the dataDescriptor implementing Deepa's myDescriptor.as and xmlCollection is the dataProvider. The code seems to work temporarily if you run it in the debugger but then xmlCollection just reverts to what it used to be on the last refresh cycle. How do I solve this problem (the full code for this tree object 'reloadTree' is below).