flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1452944 - in /flex/asjs/branches/develop/frameworks/as/src: FlexJSUIClasses.as org/apache/flex/html/staticControls/RadioButton.as
Date Tue, 05 Mar 2013 19:00:11 GMT
Author: pent
Date: Tue Mar  5 19:00:11 2013
New Revision: 1452944

URL: http://svn.apache.org/r1452944
Log:
Fixed bug where setting selected attribute on RadioButton was not being honored if the RadioButton
was the first of its group

Modified:
    flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as

Modified: flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as?rev=1452944&r1=1452943&r2=1452944&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as (original)
+++ flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as Tue Mar  5 19:00:11 2013
@@ -37,6 +37,7 @@ internal class FlexJSUIClasses
 	import org.apache.flex.html.staticControls.beads.RadioButtonBead; RadioButtonBead;
 	import org.apache.flex.html.staticControls.beads.models.TextModel; TextModel;
 	import org.apache.flex.html.staticControls.beads.models.ToggleButtonModel; ToggleButtonModel;
+	import org.apache.flex.html.staticControls.beads.models.ValueToggleButtonModel; ValueToggleButtonModel;
     import org.apache.flex.html.staticControls.beads.models.ArraySelectionModel; ArraySelectionModel;
 }
 

Modified: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as?rev=1452944&r1=1452943&r2=1452944&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as
(original)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as
Tue Mar  5 19:00:11 2013
@@ -123,14 +123,21 @@ package org.apache.flex.html.staticContr
 			_width = $width;
 			_height = $height;
 			
-			// make sure this button's selectedValue is set from its group's selectedValue
-			// to keep it in sync with the rest of the buttons in its group.
-			for each(var rb:RadioButton in dict)
-			{
-				if( rb.groupName == groupName )
+			// if this instance is selected, set the local selectedValue to
+			// this instance's value
+			if( selected ) selectedValue = value;
+			
+			else {
+			
+				// make sure this button's selectedValue is set from its group's selectedValue
+				// to keep it in sync with the rest of the buttons in its group.
+				for each(var rb:RadioButton in dict)
 				{
-					selectedValue = rb.selectedValue;
-					break;
+					if( rb.groupName == groupName )
+					{
+						selectedValue = rb.selectedValue;
+						break;
+					}
 				}
 			}
 			



Mime
View raw message