Flex – How to set the Name property of the Spark status as a string variable value in a statement

I have a spark state declared in mxml. I also have a class of string constants. I want my state name to match the string constant. Is it possible to do this directly in mxml and How to do this?
I don’t want to use the same string, I want to set the name attribute to a constant value.

Code:

public static const create:String ='create';
public static const edit:String ='edit';

MXML:


As far as I know, the state name needs to be processed at compile time, so it may not be possible.

Yes, the problem is that you cannot include constants in the status statement: (

I have spark state declared in mxml. I also have a class of string constants. I want my state name to match string constants. Is it possible to do this directly in mxml and how to do it?
I don’t want to use the same string, I want to set the name attribute to a constant value.

Code:

public static const create :String ='create';
public static const edit:String ='edit';

MXML:


As far as I know, state names need to be processed at compile time, so it may not be possible.

Yes, the problem is that you cannot include constants in the status statement: (

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5851 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.