[
https://issues.apache.org/jira/browse/FLEX-16024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14354903#comment-14354903
]
Jan F. Weber commented on FLEX-16024:
-------------------------------------
I have to agree with darronschall and the rest - it would be a great feature to
enable state name assigning with static consts from other classes to have
constructs like:
<s:State name="{CompileTimeConstants.MY_STATE_NAME}" />.
In "CompileTimeConstants.as"
public static var MY_STATE_NAME : String = "myStateName";
As mentioned here, in theory this would not be the classic data binding the
compiler currently thinks it is.
> Cannot bind to a const for compile-time attributes
> --------------------------------------------------
>
> Key: FLEX-16024
> URL: https://issues.apache.org/jira/browse/FLEX-16024
> Project: Apache Flex
> Issue Type: Bug
> Components: Data Binding
> Affects Versions: Adobe Flex SDK Previous
> Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
> Reporter: Adobe JIRA
> Assignee: Adobe JIRA
>
> Steps to reproduce:
> 1. Create a const named LOGIN_ERROR_STATE
> 2. Create a State that starts like this: <mx:State name="{LOGIN_ERROR_STATE}">
> Actual Results: Compilation error of "Error: Data binding expressions not
> supported with attributes processed at compile time."
>
> Expected Results: No compilation error
>
> Workaround (if any): Don't use a const
> I found this when using a trunk build from 10/7/08. It worked fine in Flex
> 3. It was not a big deal in my case to switch this over to the non-const
> expression, since there was only one of these cases in the code base.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)