0 Replies Latest reply on Aug 16, 2007 7:35 AM by levancho

    selectedIndices  manipulates parameter Array

    levancho Level 3
      I am thinking along the lines of being a bug , but it would be interesting to hear the reasons if its not a bug , problem is in following ;
      I have : private var defaultPriorities: Array = [3,4,5,6];
      and in init() of container I do :
      priorityList.selectedIndices = defaultPriorities;
      (priorityList is instance of listBase)
      I also have reset button that user can click to reset priorityList back to default [3,4,5,6];all reset idoes is following :
      priorityList.selectedIndices = defaultPriorities;

      problem is reset button does not work, and after little bit of digging I found that problem was in selectedIndices, specificaly : after selectedIndices execution chain is done with a indices:Array parameter , its sets it to [ ] it happens inside private method : setSelectionIndicesLoop ,so my code only works first time when container loads.I find it a little bit intrusive to change a parameter object(and at least not mention it in documetnation that this method modifies parameter etc etc ) is it a bug?