0
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
VariableArray subclass:#RadioButtonGroup
|
|
14 |
instanceVariableNames:'buttonGroup'
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Views-Support'
|
|
18 |
!
|
|
19 |
|
|
20 |
RadioButtonGroup comment:'
|
|
21 |
|
|
22 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
|
23 |
All Rights Reserved
|
|
24 |
|
|
25 |
RadioButtonGroups controll the interaction between RadioButtons
|
|
26 |
turning off other button(s) when one of the group is pressed.
|
|
27 |
|
|
28 |
@(#)RButtGrp.st 3.1 92/08/23
|
|
29 |
written nov 91 by claus
|
|
30 |
'!
|
|
31 |
|
|
32 |
!RadioButtonGroup methodsFor:'adding / removing'!
|
|
33 |
|
|
34 |
add:aRadioButton
|
|
35 |
super add:aRadioButton.
|
|
36 |
aRadioButton addDependent:self
|
|
37 |
! !
|
|
38 |
|
|
39 |
!RadioButtonGroup methodsFor:'update'!
|
|
40 |
|
|
41 |
update:changedButton
|
|
42 |
"a RadioButton in this group has changed - notify the others"
|
|
43 |
|
|
44 |
self do:[:aButton |
|
|
45 |
(aButton == changedButton) ifFalse:[
|
|
46 |
aButton isOn ifTrue:[
|
|
47 |
aButton turnOff
|
|
48 |
]
|
|
49 |
]
|
|
50 |
]
|
|
51 |
|
|
52 |
! !
|
|
53 |
|