Maybe you can save a life:
I have a simple custom itemrenderer, it displays two pictures and some text around it.
I need to manually set the dimension of one of the pictures according to its orientation - I have the code to do that (event listener for image load complete and then some manipulation) and it works fine.
Only thing - while when I scroll down all the way to the bottom of the list for the first time everything looks great, when I scroll up and down the list again, the sources of the images randomly change (so now picture number 3 on the list is appearing as number 1 - i.e first in the list) and the dimensions are also going crazy.
It looks like that when I call any async function (such as an evenlistener function), you never know if it will actually apply on the right item in the list.
I'm already overriding the set data function etc.
Any idea why this is hapenning???
You might need to make sure that if the renderer is recycled to a different
data object, that you cancel any pending load of an image.
How do I do that?
Sent from my iPhone
It would depend on how you wrote your code, but in theory, setting a new
source property and calling validateNow() should do it.