0 Replies Latest reply on Oct 15, 2007 2:44 PM by pdxFlexer

    RangeError: Error #2006: The supplied index is out of bounds.

    pdxFlexer
      I have an inline item renderer, bounded to a data source, which is an array collection of objects. These objects are used to dynamically display controls in a datagrid. Everything seems to work fine for awhile. I can slide the slider down and up and down, but when I try to slide it back up the second time I get the following error:



      RangeError: Error #2006: The supplied index is out of bounds.
      at flash.display::DisplayObjectContainer/getChildAt()
      at mx.core::Container/getChildAt()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:2 369]
      at mx.core::Container/removeChildAt()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.a s:2333]
      at mx.core::Container/removeAllChildren()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Contain er.as:3429]
      at DynamicAssertion/loadControl()[C:\software\application\weka\BuildingCharacterization\Dyna micAssertion.mxml:45]
      at BuildingCharacterization_inlineComponent1/set data()[C:\software\application\weka\BuildingCharacterization\BuildingCharacterization.mxm l:695]
      at mx.controls.dataGridClasses::DataGridBase/mx.controls.dataGridClasses:DataGridBase::makeR owsAndColumns()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\dataGridClasses\DataGridBas e.as:650]
      at mx.controls::DataGrid/mx.controls:DataGrid::makeRowsAndColumns()[C:\dev\flex_201_gmc\sdk\ frameworks\mx\controls\DataGrid.as:1293]
      at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::scrollVertically()[C: \dev\flex_201_gmc\sdk\frameworks\mx\controls\listClasses\ListBase.as:5467]
      at mx.controls::DataGrid/mx.controls:DataGrid::scrollVertically()[C:\dev\flex_201_gmc\sdk\fr ameworks\mx\controls\DataGrid.as:1923]
      at mx.controls.listClasses::ListBase/set verticalScrollPosition()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\listClasses\ListB ase.as:1043]
      at mx.controls::DataGrid/mx.controls:DataGrid::scrollHandler()[C:\dev\flex_201_gmc\sdk\frame works\mx\controls\DataGrid.as:1720]
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()[E:\dev\flex_201_borneo\sdk\frameworks\mx\core\UIComp onent.as:8389]
      at mx.controls.scrollClasses::ScrollBar/ http://www.adobe.com/2006/flex/mx/internal::dispatchScrollEvent()[E:\dev\flex_201_borneo\s dk\frameworks\mx\controls\scrollClasses\ScrollBar.as:1096
      at mx.controls.scrollClasses::ScrollThumb/mx.controls.scrollClasses:ScrollThumb::mouseMoveHa ndler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\scrollClasses\ScrollThumb.as:234]






      In my item renderer, I first removeAllChildren(), and I think this is what is causing this error. I just can’t figure out why it only does it after I slide the slider up for the second time. I have been working on this for weeks now – it has taken an unbelievable amount of time and I still can’t figure it out.

      Any help is VERY MUCH APPRICIATED!!!

      Thanks

      pdxFlexer