After addChild and after you set any other props on it

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of kenny14390
Sent: Saturday, April 12, 2008 10:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: RadioButtonGroup numRadioButtons never
changing

 

When would be the correct time to validate the buttons? I tried the
following but got the same errors...

rb.validateNow();
sectRadioCanvas.addChild(rb); 

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Radiobuttons don't actually get assigned to the group until validated.
> You can call validateNow on the buttons or wait a frame.
> 
> 
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of kenny14390
> Sent: Friday, April 11, 2008 7:22 PM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] RadioButtonGroup numRadioButtons never changing
> 
> 
> 
> I have a canvas consisting of 5 different radio button groups: Lec,
> Dis, Ind, Sem, and Act. In my Script I have the following:
> 
> var rb:RadioButton;
> rb.label = "(L) "+l.dataProvider.source[m];
> rb.name = l.dataProvider.source[m];
> rb.groupName = "Lec";
> rb.x = x;
> rb.y = y;
> y+=15;
> sectRadioCanvas.addChild(rb);
> 
> This is done a variable number of times, depending on the list "l".
> The radio buttons act as if they are in a group (only one of them is
> selectable at a time) but when I check the group's "numRadioButtons"
> field, it is always set to 0. What I wanted to do was later check the
> names of each radio button in the group and if it matches a given
> name, then change the radio button to be selected. This seems to be
> the best and only way to make a radio button be selected given only
> its name and group. Any ideas on how to circumvent this problem?
>

 

Reply via email to