incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <>
Subject Re: [jira] [Updated] (FLEX-51) Please check support for ExactValue initializer
Date Tue, 24 Apr 2012 15:43:57 GMT

> If so, why do we want to add syntax instead of having the compiler figure out that the
value will
> never change?
That would be ideal but probably much more complex to implement than this patch. It may also
we hard to work out if an expression as opposed to a variable is "constant" or not.

I'm not sure the MXML compiler (at this stage of compilation) can even work if the value will
actually change or not? Anyone know?

>  If not, how will you know when to assign the value?
I think it would safe to assume that it's the initial assigned value. The intended use case
(correct me here if I wrong) would be generally along the lines of:

public static const WIDTH:int = 200;

<s:List width="${WIDTH}" height="${WIDTH/2}" />

Might be a good idea to issue a compiler warning if you $ bind to a non const variable or
expression but not stop you from doing that.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message