I have spark States declared in mxml. I also have a class with string constants. I want my states names to match the string constants. Is it possible to do that directly in mxml and how? I don't want to use the same string, I want to set the name property to the constant's value.
code:
public static const create:String = 'create';
public static const edit:String = 'edit';
mxml:
<s:State name="new"/>
<s:State name="edit"/>
As far as I know state names need to be processed at compile time so probably it's not possible.
Yes, the problem is you cannot include constants in state declarations :(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With