RadioButtonGroup.st
changeset 38 4b9b70b2cc87
parent 7 15a9291b9bd0
child 59 450ce95a72a4
--- a/RadioButtonGroup.st	Sun Aug 07 15:22:53 1994 +0200
+++ b/RadioButtonGroup.st	Sun Aug 07 15:23:42 1994 +0200
@@ -18,16 +18,40 @@
 !
 
 RadioButtonGroup comment:'
-
 COPYRIGHT (c) 1991 by Claus Gittinger
               All Rights Reserved
 
-RadioButtonGroups controll the interaction between RadioButtons
-turning off other button(s) when one of the group is pressed.
+$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.5 1994-08-07 13:23:13 claus Exp $
+'!
+
+!RadioButtonGroup class methodsFor:'documentation '!
+
+copyright
+"
+ COPYRIGHT (c) 1991 by Claus Gittinger
+              All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.4 1993-12-11 01:48:03 claus Exp $
-written nov 91 by claus
-'!
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.5 1994-08-07 13:23:13 claus Exp $
+"
+!
+
+documentation
+"
+    RadioButtonGroups control the interaction between RadioButtons
+    turning off other button(s) when one of the group is pressed.
+"
+! !
 
 !RadioButtonGroup methodsFor:'adding / removing'!
 
@@ -41,6 +65,13 @@
 update:changedButton
     "a RadioButton in this group has changed - notify the others"
 
+    "in case we have a toggle in the group, 
+     and it has been turned off - turn it on again
+    "
+    changedButton isOn ifFalse:[
+        changedButton toggleNoAction.
+        ^ self
+    ].
     self do:[:aButton |
         (aButton == changedButton) ifFalse:[
             aButton isOn ifTrue:[