How do I ensure a Flex dataProvider processes the data synchronously?
Posted
by Matt Calthrop
on Stack Overflow
See other posts from Stack Overflow
or by Matt Calthrop
Published on 2009-08-12T20:15:29Z
Indexed on
2010/05/20
20:00 UTC
Read the original article
Hit count: 288
I am using an component, and currently have a dataProvider working that is an ArrayCollection
(have a separate question about how to make this an XML file... but I digress).
Variable declaration looks like this:
[Bindable]
private var _dpImageList : ArrayCollection = new ArrayCollection([
{"location" : "path/to/image1.jpg"},
{"location" : "path/to/image2.jpg"},
{"location" : "path/to/image3.jpg"}
]);
I then refer to like this:
<s:List
id="lstImages"
width="100%"
dataProvider="{_dpImageList}"
itemRenderer="path.to.render.ImageRenderer"
skinClass="path.to.skins.ListSkin"
>
<s:layout>
<s:HorizontalLayout gap="2" />
</s:layout>
</s:List>
Currently, it would appear that each item is processed asynchronously.
However, I want them to be processed synchronously.
Reason: I am displaying a list of images, and I want the leftmost one rendered first, followed by the one to its right, and so on.
Edit:
I just found this answer.
Do you think that could be the same issue?
© Stack Overflow or respective owner