Data Binding expressions
In MXML, you may use expressions as a source of data binding.
Example:
<mx:Label text="Beer" visible="{age >= 18}" />
The Label will only be displayed if the person is 18 or older.
Did you try a more complex expression?
<mx:Label text="Beer" visible="{age >= 18 && gender == 'male'}" />
Ah ha! You get a compiler error. Why? Because you’re inside MXML and the & character is special.
Solution: replace the & with &
<mx:Label text="Beer" visible="{age >= 18 && gender == 'male'}" />


Recent comments