[flexcoders] Re: RadioButtonGroup numRadioButtons never changing

2008-04-13 Thread kenny14390
What would be the differences?

In the example case that I posted, should I have used...

rb.group = Lec;

or

rb.group = Lec;


Thanks

--- In flexcoders@yahoogroups.com, Douglas Knudsen
[EMAIL PROTECTED] wrote:

 Note, use of groupName in AS is not the way of the light so to
speak.  Use
 rb.group = refToRadioButtonGrp
 
 DK
 
 On Fri, Apr 11, 2008 at 10:21 PM, kenny14390 [EMAIL PROTECTED] wrote:
 
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?
 
   
 
 
 
 
 -- 
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?





[flexcoders] Re: RadioButtonGroup numRadioButtons never changing

2008-04-12 Thread kenny14390
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, 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:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Friday, April 11, 2008 7:22 PM
 To: flexcoders@yahoogroups.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?





RE: [flexcoders] Re: RadioButtonGroup numRadioButtons never changing

2008-04-12 Thread Alex Harui
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?