Notes on Java, Solaris, PHP, LDAP…

August 21, 2008

Weird Flex states

Filed under: Java — negev @ 6:06 pm
Tags:

I had a weird experience with Flex states in Flex 2.0.1. My component had an initialization function. That set currentState to one of two values depending on something. Later on in the same function it checked for a few rare situations, and if any of those occurred then it set currentState to some special values.

Somehow Flex or Flash player didn’t like that and it rendered the 2nd (special/rare) state on top of the 1st state. Solution: instead of setting currentState directly, set some temp variable e.g. state:String. Then once state doesn’t change assign it to currentState. Note that you can’t use any GUI objects specific to that state before you switch to it.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: