RadioButtonGroup.st
changeset 1810 8aa2eca2f50f
parent 1377 56fd9ea18a26
child 1815 e3a6c8e93fd1
--- a/RadioButtonGroup.st	Fri Mar 19 22:13:33 1999 +0100
+++ b/RadioButtonGroup.st	Sat Mar 20 00:29:11 1999 +0100
@@ -233,7 +233,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.28 1997-11-02 17:51:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.29 1999-03-19 23:29:11 cg Exp $'
 ! !
 
 !RadioButtonGroup class methodsFor:'helpers'!
@@ -280,15 +280,15 @@
     self add:aRadioButton value:nil
 !
 
-add:aRadioButton value:aValue
+add:aRadioButton value:aValueOrNil
     "add a radioButton to the group - actually, this name is misleading;
-     it simple creates an adaptor, which converts my value into a boolean,
-     depending on the buttons index-number or aValue"
+     it simply creates an adaptor, which converts my value into a boolean,
+     depending on the buttons index-number or aValueOrNil"
 
-    |adaptor select|
+    |adaptor selectValue|
 
     numberOfValues := (numberOfValues ? 0) + 1.
-    select  := aValue ? numberOfValues.
+    selectValue  := aValueOrNil ? numberOfValues.
 
     "/ the adapter plays boolean-value holder towards
     "/ the radioButton, returning true iff the groups
@@ -296,22 +296,9 @@
     "/ Likewise, a true-store from the button sets the group value
     "/ to the buttons index.
 
-"/    adaptor := PluggableAdaptor on:self.
-"/    adaptor getBlock:[:m | (m value == select) ]
-"/            putBlock:[:m :onOff | 
-"/                           onOff ifTrue:[
-"/                               m value:select
-"/                           ] ifFalse:[
-"/                               select == value ifTrue:[
-"/                                   m value:nil 
-"/                               ]
-"/                           ]
-"/                     ]
-"/         updateBlock:[:m :a :v | true].
-
-    adaptor := self class adaptorFor:self value:select.
+    adaptor := self class adaptorFor:self value:selectValue.
     aRadioButton isOn ifTrue:[
-        self value:select.
+        self value:selectValue.
     ].
     aRadioButton model:adaptor.