Wednesday, October 17, 2007

We all now that Flex is very much like Java. Do not forget then that in Java the expressions are evaluated from left to right. So, if you have an expression:

a = a && b;


and a is false, b will not be looked at. This is important to remember in case when b is some expression and you want it to be evaluated no matter what a is:

a = a && anImportantUpdateFunction();


If a is false, then anImportantUpdateFunction() will not be called.

No comments: