actionscript-3apache-flexflex3itemrenderer

The property still has the old value in validateProperties


I have a custom renderer (inherits from AdvancedDataGridItemRenderer), and I'm overriding validateProperties and using the value of the width property, but I'm getting the old value every time! Isn't validateProperties supposed to execute after the properties were committed (I'm calling super)? Here's my code:

public override function validateProperties():void
{
    super.validateProperties();
    if ((AdvancedDataGrid(listData.owner).columns[listData.columnIndex].
            showDataTips)&&(textWidth>width))
        toolTip=listData.label;
    else toolTip=null;
}

Thanks!


Solution

  • I solved it. The trick is to use validateSize for the width property. validateProperties is for properties that don't belong to any of the other groups for which there's a dedicated validateX function (such as validateSize, validateList, etc.).