Amy, 

 

Many folks have used HBox as a renderer successfully.  Maybe there's
something about repeater that is exposing a problem, but all I can do at
this point is try to offer advice on how to get more information about
the problem.  Overriding measure so you can see what it says is a
temporary measure for debugging purposes and a worthwhile pattern to use
in other scenarios.  If you're comfortable with the debugger, debug
through the makeRowsAndColumns and see what the renderer is reporting.
You've been one this list long enough that you are no longer a "newbie"
and should be learning these debugging techniques.

 

My last point about recycling was important.  Because there is
recycling, it is possible that the repeater is regenerating its children
more than once, which might somehow be related to this problem, and is
likely to cause performance issues for you later.  Avoiding the use of
repeater would probably be a good thing.  Is the number of children the
repeater generates the same for every row?  Does it only vary by a few?
If so, it might be worth skipping repeater and simply declaring the max
set of children and hiding a few.

 

I can tell from your tone that you've run out of patience, and I wish I
had the quick answer for you, but I don't because use of repeaters in a
renderer isn't that common.  I will continue to try to help if you
remain patient with me.

 

-Alex

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Tuesday, April 22, 2008 7:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tiny components when using callLater()

 

Hi, Alex;

>
> The HBox has been pretty thoroughly debugged, but that doesn't mean 
it
> will work for you in all possible scenarios. A single call to
> validateClient is made then the HBox's measurements are used. 
Anything
> that causes a second validation pass can be missed.
> 
> 
> 
> Calling measure() directly can confuse things as the measurement may
> depend on proper validation of the children. validateClient is
> recommended, but it is being called for you.

Do you have any examples that show the proper way to do this? I've 
looked at the help till my eyes are crossing, and I am just stabbing 
around in the dark trying to figure this out.

> I would override measure() so you can see what numbers it is 
reporting
> and decide whether that is right nor not. If not, then see if the
> repeater is causing a second pass. If it is reporting the right 
number,
> then updateDisplayLIst should be called later with the right number.

I know _you_ would override measure :-), but my feeling is that if 
the code you guys wrote isn't working, what hope does a newbie like 
me have of doing something that works better? Besides, it does seem 
to be working just fine, but the measurements aren't getting 
passed "up the chain" to the containing HorizontalList, and I have no 
idea how to convince that component to "see" that its children are 
larger than it has allowed room for and expand to allow them to be 
seen.

> Also keep in mind that renderers are recycled so the renderer that
> generates some number of children for the first row can end up 
rendering
> some other row later.

The first step is to get everything visible. Then I'll worry about 
what happens when new items are added to the collection (which is the 
only reason the items that are being rendered would change).

Thanks;

Amy

 

Reply via email to