I have spark states declared in mxml. I also have a class with string constants. I want the names of my states to match string constants. Is it possible to do this directly in mxml and how? I donβt want to use the same string, I want to set the name property to a constant value.
the 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 should be processed at compile time, so this is probably not possible.
source
share