This content has been marked as final. Show 9 replies
I struggled with for as well for a while.
Basically, Flex runs the itemRenderer for the next item or so on the list even if it isn't in view, just so it is ready in case you scroll etc.
If you need more help on itemRenderers, this is a great link, helped me a lot:
This one is also very good:
with the specific item called "Thinking About Item Renderers" explainign what you see very well.
Thanks for replying. I had a look at those two articles, they gave me a better understanding of itemrenderers but they dont seem to have the answer to my problem.
The first link also only has part 1, 4 and 5 on itemrenderers too ? The others are missing.
Does anyone know specificaly what I am doing wrong in my code? Id like to be able to understand whats going on so I can avoid the problem in future.
"Matt-Adamson" <email@example.com> wrote in message
> Thanks for replying. I had a look at those two articles, they gave me a
> understanding of itemrenderers but they dont seem to have the answer to my
> The first link also only has part 1, 4 and 5 on itemrenderers too ? The
> are missing.
> Does anyone know specificaly what I am doing wrong in my code? Id like to
> able to understand whats going on so I can avoid the problem in future.
These may give you more insight:
All five articles are on that page, just in a weird order :-)
Had a look at both of your links but they dont seem to contain anything I dont already know, neither is a proper explanation of what is going on.
You can't care about how many times a renderer "runs", that is meaningless concept.
You also cannot use the creationComplete event to display data in an itemrenderer.
Re-read Amy's FAQ, and then find an exsting renderer and modify it to work for you. Or study up a lot more.
Creating a renderer is quite a bit more complicated than you currently understand.
This one was bugging me last night as I wasn't as helpful as I could have been, so I have had a closer look at your code.
If you modify it as follows in the snippet below (not perfect, but works), that should get you going. Basically, removed the creationComplete event (no need, the itemRenderer will fire when needed) and also ensured that the date you are converting is the one you want. It is a subtle difference but some basics added like the need to super the value coming over etc.
I know you say the articles posted don't have what you don't already know, but it is all in there, honest. :)
"ntsiii" <firstname.lastname@example.org> wrote in message
> You can't care about how many times a renderer "runs", that is meaningless
> You also cannot use the creationComplete event to display data in an
> Re-read Amy's FAQ, and then find an exsting renderer and modify it to work
> you. Or study up a lot more.
> Creating a renderer is quite a bit more complicated than you currently
Don't be silly. No one can tell him anything new about this, because he
already knows it all :-p.
That’s a great contribution Amy thanks, not childish at all. Is that because I asked for comments on a specific problem and said that I couldn’t find it in your own articles? I had updated my code from what I originally posted and had it working from what Ian kindly provided.
I was simply asking if somebody knew specifically what part of my code or even in theory what was causing the behaviour of my script so I could learn from it. I'm quite experienced in several languages and web techs and your making comments as if I have asked a ridiculous question and somehow been out of order with you. Obviously being eager to learn about was wrong in my theory was a mistake.