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.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.