flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: RadioButtonGroup
Date Tue, 15 Oct 2013 16:38:32 GMT


On 10/15/13 3:01 AM, "mark goldin" <markzolotoy@gmail.com> wrote:

>Another idea is to be able to generate new or modify existing template
>that
>can look like this:
><fx:Declarations>
><s:RadioButtonGroup id="cardtype"/>
></fx:Declarations>
><s:HGroup>
><s:RadioButton group="{cardtype}"
>   id="americanExpress"
>   label="American Express"
>   width="150"/>
><s:RadioButton group="{cardtype}"
>   id="masterCard"
>   label="MasterCard"
>   width="150"/>
></s:HGroup>
>
>All I will need to do is to change "cardtype" to some unique name for
>every
>RadioButtonGroup being added at the run time.
>Is something like this possible?
That would be tricky because a property called "cardtype" is generated on
the enclosing class and if you change the name you need to generate a
different property slot as which you can't do at runtime.

I think the best bet is to assume that all radiobuttons in a
radiobuttongroup are in the same MXML file/instance so that groupname
doesn't have to be unique everywhere.

-Alex


Mime
View raw message