Wow, thanks much for sharing, Troy.

2007/8/24, Troy Gilbert <[EMAIL PROTECTED]>:
>
>   It's actually much simpler than that. You were doing exactly the right
> thing in your very first try, you just needed to encode the ampersands as
> XML entities because you're in an XML file. Instead of "&&" you should have
> used "&amp;&amp;". Like this:
>
> <mx:Canvas
> id="cashMatchingCounterPartyModeButton"
> visible="{(cashMatchingModeButton.selected &amp;&amp;
> counterPartyModeButton.selected)}"
> width="100%" height="100%"
> >
>
> And to fix your second issue, you can just as simply add a do-nothing
> setter (though that does put a setter in the interface of your class, which
> may hurt some folks proper-oop-feelings, in which case the linked-to
> solution is the "proper" one). E.g.,
>
> [Bindable]
> public function get someValue():Boolean { return
> someComplexExpressionInvolvingIntermediateVariables; }
> public function set someValue(value:Boolean):void { }
>
> There was a thread regarding this recently (binding to read-only
> getters)...
>
> I'd argue this is something the Flex guys should change...
>
> Troy.
>
>
> On 8/24/07, Mikhail Shevchuk < [EMAIL PROTECTED]> wrote:
>
> >  http://www.rubenswieringa.com/blog/binding-read-only-accessors-in-flex
> >
> > This article was extremely useful while solving the issue.
> >
> > 2007/8/24, Mikhail Shevchuk <[EMAIL PROTECTED]>:
> > >
> > >   Hello, flexcoders.
> > >
> > > I have a bunch of RadioButton controls from two different groups
> > > (modes and mainModes):
> > >
> > > <mx:RadioButton
> > > id="cashMatchingModeButton"
> > > groupName="mainModes"
> > > />
> > >
> > > <mx:RadioButton
> > > id="affirmationsModeButton"
> > > groupName="mainModes"
> > > />
> > >
> > > <mx:RadioButton
> > > id="counterPartyModeButton"
> > > groupName="modes"
> > > />
> > >
> > > <mx:RadioButton
> > > id="payDateModeButton"
> > > groupName="modes"
> > > />
> > >
> > > I would like to bind visibility of the Canvas object (aCanvas) to the
> > > result of (cashMatchingModeButton.selected &&
> > > counterPartyModeButton.selected) but I can't implement it directly
> > > using the following code:
> > >
> > > <mx:Canvas
> > > id="cashMatchingCounterPartyModeButton"
> > > visible="{(cashMatchingModeButton.selected &&
> > > counterPartyModeButton.selected)}"
> > > width="100%" height="100%"
> > > >
> > >
> > > The following error occurred at the compile-time: "The entity name
> > > must immediately follow the '&' in the entity reference."
> > >
> > > I also tried to use the getter:
> > >
> > > [Bindable]
> > > public function get isCashMatchingCounterPartyMode():Boolean
> > > {
> > > return (cashMatchingModeButton.selected &&
> > > counterPartyModeButton.selected);
> > > }
> > >
> > > But that caused warning message:
> > > "[Bindable] on read-only getter is unnecessary and will be ignored."
> > >
> > > What is the most elegant way to solve this issue ?
> > >
> > > --
> > > Thanks,
> > > Mikhail Shevchuk
> > >
> >
> >
> >
> > --
> > A vivid and creative mind characterizes you.
> >
>
>  
>



-- 
A vivid and creative mind characterizes you.

Reply via email to