ListBase/List recycles renderers, but the renderers themselves have to
be written in a way that supports recycling.  Renderers must be
completely data-driven, which means that aspects like their height must
be determined from the data or related information.  It looks like
you're just storing a new height, so if a renderer set to 60 gets
recycled as a renderer that should be 30, no code except a click will
set it back to 30, which isn't right.

 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Florian d'Erfurth
Sent: Tuesday, January 22, 2008 11:31 PM
To: [email protected]
Subject: Re: [flexcomponents] Re: List variableRowHeight and override
set data in the item renderer

 

Shouldn't the recycling be handled by List / ListBase ?

On Jan 22, 2008 7:16 PM, Alex Harui <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

Looks like you're not handling recycling correctly.

 

________________________________

From: [email protected]
<mailto:[email protected]>
[mailto:[email protected]
<mailto:[email protected]> ] On Behalf Of Florian d'Erfurth
Sent: Tuesday, January 22, 2008 8:34 AM
To: [email protected]
<mailto:[email protected]> 
Subject: [flexcomponents] Re: List variableRowHeight and override set
data in the item renderer

 

here is the demo (you can view source):
http://thetaskbox.com/stuff/_testvariablerowheight/main.swf
<http://thetaskbox.com/stuff/_testvariablerowheight/main.swf> 

and i forgot to say i was using FB build 3.0.190133

On Jan 22, 2008 5:23 PM, Florian d'Erfurth <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

I think i've spotted a bug in List, anyway weird things happens:

As soon as i have variableRowHeight set to true for a List and its
custom item renderer with set data overrid, components resizing are
swapped amongst the itemRenderers. 


Here's an example, in a renderer a button resize itself on click:

<mx:Button height="30" id="myButton"
        click="myButton.height = ( myButton.height == 30 ) ? 60 : 30"
        />

well if the user click the button, that's not the one clicked that will
be resized but another one in another random item renderer.

The funny thing is that it happens only if: 
List variableRowHeight is set to true
set data is overrid in the item renderer

also that happen only on height change.


My problem is that i need to show/hide the controls of my item editors
on mouse over, i'll post some demo code later. 

 

 

 

Reply via email to