Thanks for your help, but I was looking for something closer to what Gordon
posted.

i.e. && instead of && I’m trying to keep interaction designers from
writing to much action script code for basic interaction logic.

Thanks again.

jason


-----Message d'origine-----
De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la
part de Darren Houle
Envoyé : mardi 16 mai 2006 21:47
À : flexcoders@yahoogroups.com
Objet : RE: [flexcoders] Using a logical AND in property.


Jason,

I know this doesn't actually answer your question, but I ran into the same
thing recently and found that I was looking at the problem backward.  I was
trying to set enabled on a Panel based on whether one or more rows were
selected in a DataGrid.  I tried the same things you did, adding AS code to
the Panel's enabled property.  I had all kinds of trouble and nothing seemed
to work right, until I decided to do things "backwards."

Instead of adding code to the enabled property that "watched" or was bound
to other values or components, I added an itemClick="panelEnabler();" to the
DataGrid.  The panelEnabler() function just looks like:

public function assignPanelEnabler():void {
     if(dgAccts.selectedItems.length >= 1)
          { assign_panel.enabled=true; }
     else
          {assign_panel.enabled=false; }
     }

Now, the DataGrid runs the function whenever items are clicked, and the
function changes the enabled property for the Panel.  Works perfectly, and
you don't need to worry about using && inside the enabled property field,
you can put all your if...then logical operators in the function script.

Darren



>From: "Jason Hawryluk" <[EMAIL PROTECTED]>
>Reply-To: flexcoders@yahoogroups.com
>To: <flexcoders@yahoogroups.com>
>Subject: RE: [flexcoders] Using a logical AND in property.
>Date: Tue, 16 May 2006 15:46:27 +0200
>
>I've tried about 10-20 different ways just can't seem to make it work. I
>suppose that a function is the only way, but it's unfortunate. Being able
>to
>compare 1 or more bound values in order to get the result would be very
>handy in my particular case.
>
>Below is the error I get.
>
>Error: The entity name must immediately follow the '&' in the entity
>reference.
>
>
>
>On a good note I did get this to work
>
>{value1.selected==value2.selected}
>
>but that will only do in certain circumstances.
>
>
>Thanks for your help. I'm still trying to get Flex to do it, if anyone has
>any ideas...
>
>Jason
>
>
>-----Message d'origine-----
>De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la
>part de Michael Schmalle
>Envoyé : mardi 16 mai 2006 15:24
>À : flexcoders@yahoogroups.com
>Objet : Re: [flexcoders] Using a logical AND in property.
>
>
>Hi,
>
>I don't even know if you can do it but, did you try using parenthesis ?
>
>Peace, Mike
>
>
>On 5/16/06, sourcecoderia <[EMAIL PROTECTED]> wrote:
>I'm wanting to be able to do something like the below, where the &&
>operator is used for a locale compare on the Boolean values, however I
>keep getting errors with the various methods I've tried.
>
><mx:CheckBox enabled="{value1.selected==true &&
>value2.selected==true }" label="myitem" id="chk_item" />
>
>Where values(1 and 2) are other checkbox controls.
>
>Any ideas on a good way to do the above. I'm trying to stay away from
>script as much as possible for this type of stuff in order to keep it
>as simple as possible for the UI designer.
>
>Thanks
>
>Jason
>
>
>
>
>
>
>--
>Flexcoders Mailing List
>FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
>
>YAHOO! GROUPS LINKS
>
>  Visit your group "flexcoders" on the web.
>
>  To unsubscribe from this group, send an email to:
>   [EMAIL PROTECTED]
>
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>
>
>
>--
>What goes up, does come down.
>
>--
>Flexcoders Mailing List
>FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
>
>YAHOO! GROUPS LINKS
>
>  Visit your group "flexcoders" on the web.
>
>  To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>
>
>--
>Flexcoders Mailing List
>FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>Yahoo! Groups Links
>
>
>
>
>
>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links












--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to