If the DG thinks the renderer needs an update because its size may have
changed, it will refresh all renderers.  Maybe when you use the slider a
second time the slider/renderer thinks it needs a re-measure.  Also note
that renderers are recycled so the second time around the renderer may
not be in the state you expected and some child got re-parented or
removed some other way.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of pdxpearlguy
Sent: Monday, October 15, 2007 2:54 PM
To: [email protected]
Subject: [flexcoders] RangeError: Error #2006: The supplied index is out
of bounds.

 

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:2369]
at mx.core::Container/removeChildAt()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:2333]
at mx.core::Container/removeAllChildren()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:3429]
at DynamicAssertion/loadControl()
[C:\software\application\weka\BuildingCharacterization\DynamicAsserti
on.mxml:45]
at BuildingCharacterization_inlineComponent1/set data()
[C:\software\application\weka\BuildingCharacterization\BuildingCharac
terization.mxml:695]
at 
mx.controls.dataGridClasses::DataGridBase/mx.controls.dataGridClasses
:DataGridBase::makeRowsAndColumns()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\dataGridClasses\DataG
ridBase.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::s
crollVertically()
[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\frameworks\mx\controls\DataGrid.as:1923]
at mx.controls.listClasses::ListBase/set 
verticalScrollPosition()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\listClasses\ListBase.
as:1043]
at mx.controls::DataGrid/mx.controls:DataGrid::scrollHandler
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\DataGrid.as:1720]
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
[E:\dev\flex_201_borneo\sdk\frameworks\mx\core\UIComponent.as:8389]
at 
mx.controls.scrollClasses::ScrollBar/http://www.adobe.com/2006/flex/m
<http://www.adobe.com/2006/flex/m> 
x/internal::dispatchScrollEvent()
[E:\dev\flex_201_borneo\sdk\frameworks\mx\controls\scrollClasses\Scro
llBar.as:1096]
at 
mx.controls.scrollClasses::ScrollThumb/mx.controls.scrollClasses:Scro
llThumb::mouseMoveHandler()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\scrollClasses\ScrollT
humb.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

 

Reply via email to