how to add the Logical operator in MXML

Misc-Tutorial-48x48 For example , you have something like this:

<mx:VBox visible="{this.numChildren > 555 }" />

The preceding code will not compile,The compiler raises the following error:- “The entity name must immediately follow the ‘>’ in the entity reference.”.This behavior existed since Flex 2.0. Logical OR operator works in the same scenario. It’s the use of ‘&&’ that causes the compiler error.

For greater than, use > and for less than, use <

So it will be

<mx:VBox visible="{this.numChildren &gt; 555 }" />
BTW:You can get more information from here about logical operators in binding MXML
Share and Enjoy:
  • Digg
  • Facebook
  • Google Bookmarks
  • DZone
  • Reddit
  • Technorati
  • StumbleUpon
  • Twitter
RSS Enjoy this Post? Subscribe to

RSS Feed   RSS Feed     Email Feed  Email Feed Follow us Follow us
You can leave a response, or trackback from your own site.

Leave a Reply