no need to care for RETURN-keyPress; its already done by the keyboard processor
authorClaus Gittinger <cg@exept.de>
Wed, 17 Dec 2008 19:56:21 +0100
changeset 3804 8a4b07e9ee4e
parent 3803 89a1a8666070
child 3805 33b4a2271c19
no need to care for RETURN-keyPress; its already done by the keyboard processor
OptionBox.st
--- a/OptionBox.st	Wed Dec 17 16:31:45 2008 +0100
+++ b/OptionBox.st	Wed Dec 17 19:56:21 2008 +0100
@@ -540,15 +540,16 @@
 
     <resource: #keyboard (#Return)>
 
-    |action|
-
-    defaultButtonIndex notNil ifTrue:[
-        (aKey == #Return) ifTrue:[
-            self hide.
-            action := actions at:defaultButtonIndex.
-            action value
-        ]
-    ].
+"/ now done by keyboard processor
+"/    |action|
+"/
+"/    defaultButtonIndex notNil ifTrue:[
+"/        (aKey == #Return) ifTrue:[
+"/            self hide.
+"/            action := actions at:defaultButtonIndex.
+"/            action value
+"/        ]
+"/    ].
     super keyPress:aKey x:x y:y
 
     "Modified: 7.3.1996 / 13:17:36 / cg"
@@ -614,12 +615,9 @@
 
         button := Button label:'press'.
         button action:[
-                       |action|
-
                        (buttons at:index) turnOffWithoutRedraw.
                        self hide.
-                       action := actions at:index.
-                       action value
+                       (actions at:index) value
                       ].
 "/        index == nButt ifTrue:[
 "/            button isReturnButton:true
@@ -677,5 +675,5 @@
 !OptionBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.67 2008-10-26 20:11:18 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.68 2008-12-17 18:56:21 cg Exp $'
 ! !