On 4/24/12 8:52 AM, "Justin Mclean" <jus...@classsoftware.com> wrote:
> Hi,
>
>> Should it be binding until the first (not null) assignment
>> is made and then detach itself? Just run on creation complete and then
>> never again?
>
> If you look at the patch no binding is set up but the value is just set in
> when the component is created internally via new (ie way before creation
> complete).
There is no guarantee of instantiation order in MXML. That's one of the
reasons binding is "slow". It evaluates expressions often just in case some
portion of the expression suddenly becomes available. I can see optimizing
for a constant expression, but if there are variables, I think some folks
are going to get burned by timing problems.
>
> Although waiting until first non null value also sounds like an interesting
> idea.
Waiting requires essentially the same code as binding.
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui