Sadly it's a "feature" of MXML.

You can do one of two things:

1) You can use && instead.
2) or, You can write a boolean AND function that takes in two parameters, performs the boolean AND, then returns the result.

Example for #1:
enabled="{((tabs.selectedIndex==1) && (selected_row > -1))}"

Example for #2:
private function booleanAnd(first:Boolean, second:Boolean):Boolean
{
        return first && second;
}
enabled="{booleanAnd((tabs.selectedIndex==1),(selected_row > -1))}"

Thanks,

Justin Nichols
Flex Developer


On Apr 11, 2009, at 11:48 PM, Atlanta Geek wrote:

One of my menu items looks like this
<menuitem id="copy" label="Copy Test"
enabled="{((tabs.selectedIndex==1) && (selected_row > -1))}"/>
The problem is that I get the following error.
'the entity name must immediately follow the '&' in the entity reference.'

I am not trying to reference a variable but am trying to do a logical 'and' .
Strangely enough '||' is ok.

FYI if this is a bug my work around is this

!((tabs.selectedIndex != 1) || (selected_row <= -1))

--
http://www.atlantageek.com


-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------





-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------


Reply via email to