Toggle.st
changeset 1353 5dac6aa6ac96
parent 1083 13e64cc1c493
child 1385 691d891fa440
--- a/Toggle.st	Thu Oct 16 16:44:11 1997 +0200
+++ b/Toggle.st	Tue Oct 21 20:03:18 1997 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+'From Smalltalk/X, Version:3.2.1 on 20-oct-1997 at 3:15:58 pm'                  !
+
 Button subclass:#Toggle
 	instanceVariableNames:'showLamp lampColor lampWidth lampHeight'
 	classVariableNames:'DefaultShowLamp DefaultLampColor'
@@ -362,13 +364,13 @@
 updateStyleCache
     "extract values from the styleSheet and cache them in class variables"
 
-    <resource: #style (#toggleShowLamp
-                       #toggleLampColor)>
+    <resource: #style (#'toggle.showLamp'
+                       #'toggle.lampColor')>
 
-    DefaultShowLamp := StyleSheet at:'toggleShowLamp' default:false.
-    DefaultLampColor := StyleSheet colorAt:'toggleLampColor' default:Color yellow.
+    DefaultShowLamp := StyleSheet at:'toggle.showLamp' default:false.
+    DefaultLampColor := StyleSheet colorAt:'toggle.lampColor' default:Color yellow.
 
-    "Modified: 1.3.1996 / 13:50:30 / cg"
+    "Modified: 20.10.1997 / 15:15:35 / cg"
 ! !
 
 !Toggle methodsFor:'accessing-look'!
@@ -498,7 +500,7 @@
 	] ifFalse:[
 	    val := model perform:aspectMsg with:self
 	].
-	val ifTrue:[
+	val == true ifTrue:[  "allowing nil - treat as false"
 	    self turnOn
 	] ifFalse:[
 	    self turnOff
@@ -562,5 +564,5 @@
 !Toggle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.37 1997-02-28 18:54:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.38 1997-10-21 18:03:18 cg Exp $'
 ! !