Hi all,
Let's refer to the listing of the method "validateProperties" from mx.core.UIComponent class from Flex 3 (Flex 4) SDK
public function validateProperties():void
{
if (invalidatePropertiesFlag)
{
commitProperties();
invalidatePropertiesFlag = false;
}
}
My question is:
Why dirty flag invalidatePropertiesFlag is reset after commitProperties call, but not before this call?
I speculate this is because:
1) it is just a matter of life to put dirty flag at the end of IF block;
2) If code within commitProperties raises RTE, we still will have a chance to execute the code in commitProperties during playing next frame in Flash Player and this time maybe the code will not throw RTE.
The reason why do I ask this question is the following fact:
If the code within commitProperties will try to invalidate some another UIComponent's property by using dirty flag and invalidateProperties invalidation call, then this invalidation call will not be added to mx.managers.LayoutManager.invalidatePropertiesQueue, because dirty flag invalidatePropertiesFlag was not yet reset before commitProperties call.