change the model before performing any actionBlock
authorClaus Gittinger <cg@exept.de>
Fri, 24 Jan 1997 15:32:29 +0100
changeset 971 8caaeb9d63fb
parent 970 188efaece4a0
child 972 52c5200c35b7
change the model before performing any actionBlock
ButtonC.st
ButtonController.st
--- a/ButtonC.st	Thu Jan 23 16:57:20 1997 +0100
+++ b/ButtonC.st	Fri Jan 24 15:32:29 1997 +0100
@@ -19,7 +19,7 @@
 	category:'Interface-Support-Controllers'
 !
 
-!ButtonController  class methodsFor:'documentation'!
+!ButtonController class methodsFor:'documentation'!
 
 copyright
 "
@@ -80,7 +80,7 @@
 "
 ! !
 
-!ButtonController  class methodsFor:'defaults'!
+!ButtonController class methodsFor:'defaults'!
 
 defaultInitialDelay
     "when autorepeat is enabled, and button is not released,
@@ -456,8 +456,30 @@
     ].
 
     "
+     ST-80 style model notification ...
+     this updates the model (typically, a ValueHolder)
+    "
+    (isToggle
+    or:[(isTriggerOnDown and:[pressed])
+    or:[isTriggerOnDown not and:[pressed not]]]) ifTrue:[
+        "the ST-80 way of doing things"
+        view notNil ifTrue:[
+            active := true.
+            view sendChangeMessageWith:value.
+            active := false.
+        ].
+    ].
+
+    "
      ST/X style actionBlock evaluation & channel notification ...
     "
+    pressChannel notNil ifTrue:[
+        pressChannel value:pressed 
+    ].
+    releaseChannel notNil ifTrue:[
+        releaseChannel value:pressed not
+    ].
+
     pressed ifTrue:[
         action := pressActionBlock.
     ] ifFalse:[
@@ -472,28 +494,8 @@
         ].
         active := false.
     ].
-    pressChannel notNil ifTrue:[
-        pressChannel value:pressed 
-    ].
-    releaseChannel notNil ifTrue:[
-        releaseChannel value:pressed not
-    ].
 
-    "
-     ST-80 style model notification ...
-    "
-    (isToggle
-    or:[(isTriggerOnDown and:[pressed])
-    or:[isTriggerOnDown not and:[pressed not]]]) ifTrue:[
-        "the ST-80 way of doing things"
-        view notNil ifTrue:[
-            active := true.
-            view sendChangeMessageWith:value.
-            active := false.
-        ].
-    ].
-
-    "Modified: 15.7.1996 / 13:40:59 / cg"
+    "Modified: 24.1.1997 / 11:38:20 / cg"
 !
 
 pointerEnter:state x:x y:y
@@ -599,8 +601,8 @@
     "Modified: 15.7.1996 / 13:40:14 / cg"
 ! !
 
-!ButtonController  class methodsFor:'documentation'!
+!ButtonController class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.35 1996-07-15 14:41:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.36 1997-01-24 14:32:29 cg Exp $'
 ! !
--- a/ButtonController.st	Thu Jan 23 16:57:20 1997 +0100
+++ b/ButtonController.st	Fri Jan 24 15:32:29 1997 +0100
@@ -19,7 +19,7 @@
 	category:'Interface-Support-Controllers'
 !
 
-!ButtonController  class methodsFor:'documentation'!
+!ButtonController class methodsFor:'documentation'!
 
 copyright
 "
@@ -80,7 +80,7 @@
 "
 ! !
 
-!ButtonController  class methodsFor:'defaults'!
+!ButtonController class methodsFor:'defaults'!
 
 defaultInitialDelay
     "when autorepeat is enabled, and button is not released,
@@ -456,8 +456,30 @@
     ].
 
     "
+     ST-80 style model notification ...
+     this updates the model (typically, a ValueHolder)
+    "
+    (isToggle
+    or:[(isTriggerOnDown and:[pressed])
+    or:[isTriggerOnDown not and:[pressed not]]]) ifTrue:[
+        "the ST-80 way of doing things"
+        view notNil ifTrue:[
+            active := true.
+            view sendChangeMessageWith:value.
+            active := false.
+        ].
+    ].
+
+    "
      ST/X style actionBlock evaluation & channel notification ...
     "
+    pressChannel notNil ifTrue:[
+        pressChannel value:pressed 
+    ].
+    releaseChannel notNil ifTrue:[
+        releaseChannel value:pressed not
+    ].
+
     pressed ifTrue:[
         action := pressActionBlock.
     ] ifFalse:[
@@ -472,28 +494,8 @@
         ].
         active := false.
     ].
-    pressChannel notNil ifTrue:[
-        pressChannel value:pressed 
-    ].
-    releaseChannel notNil ifTrue:[
-        releaseChannel value:pressed not
-    ].
 
-    "
-     ST-80 style model notification ...
-    "
-    (isToggle
-    or:[(isTriggerOnDown and:[pressed])
-    or:[isTriggerOnDown not and:[pressed not]]]) ifTrue:[
-        "the ST-80 way of doing things"
-        view notNil ifTrue:[
-            active := true.
-            view sendChangeMessageWith:value.
-            active := false.
-        ].
-    ].
-
-    "Modified: 15.7.1996 / 13:40:59 / cg"
+    "Modified: 24.1.1997 / 11:38:20 / cg"
 !
 
 pointerEnter:state x:x y:y
@@ -599,8 +601,8 @@
     "Modified: 15.7.1996 / 13:40:14 / cg"
 ! !
 
-!ButtonController  class methodsFor:'documentation'!
+!ButtonController class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.35 1996-07-15 14:41:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.36 1997-01-24 14:32:29 cg Exp $'
 ! !