TileList showing wrong data after using removeItemAt when scrolled
i have rather strange error occuring, me seems bug
with tilelist...
i have small application tilelist , button.
the tilelist has xmllistcollection dataprovider.
on initialization add 100 entries collection. come
up nicely in tilelist. scroll bottom of tillist
and click button.
the button calls removeitemat on 5 items in part of collection
that not visible.
when scroll up, items deleted gone tilelist
as should, of first items in collection.
if print contents of collection, first items still
there, aren't shown in tilelist...
if run excact same code, keep items removed
visible when click button, works fine.
<mx:script>
<![cdata[
import mx.collections.xmllistcollection;
[bindable]
private var dp:xmllistcollection = new xmllistcollection();
private function oninit():void{
for (var i:int = 0 ; < 100 ; i++)
dp.additem(<p p={i}/>);
}
private function ondelete(event:event):void{
for (var i:int = 0 ; < 5 ; i++)
dp.removeitemat(20);
}
]]>
</mx:script>
<mx:tilelist id="tile" dataprovider="{dp}" width="200" height="300"
rowheight="20" labelfield="@p" columnwidth="40"/>
<mx:button label="delete" click="ondelete(event)"/>
with tilelist...
i have small application tilelist , button.
the tilelist has xmllistcollection dataprovider.
on initialization add 100 entries collection. come
up nicely in tilelist. scroll bottom of tillist
and click button.
the button calls removeitemat on 5 items in part of collection
that not visible.
when scroll up, items deleted gone tilelist
as should, of first items in collection.
if print contents of collection, first items still
there, aren't shown in tilelist...
if run excact same code, keep items removed
visible when click button, works fine.
<mx:script>
<![cdata[
import mx.collections.xmllistcollection;
[bindable]
private var dp:xmllistcollection = new xmllistcollection();
private function oninit():void{
for (var i:int = 0 ; < 100 ; i++)
dp.additem(<p p={i}/>);
}
private function ondelete(event:event):void{
for (var i:int = 0 ; < 5 ; i++)
dp.removeitemat(20);
}
]]>
</mx:script>
<mx:tilelist id="tile" dataprovider="{dp}" width="200" height="300"
rowheight="20" labelfield="@p" columnwidth="40"/>
<mx:button label="delete" click="ondelete(event)"/>
has else noticed this, or verify not happening here?
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment