--- a/EnterBox2.st Mon Feb 06 01:52:01 1995 +0100
+++ b/EnterBox2.st Mon Feb 06 01:53:30 1995 +0100
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.8 1994-10-28 03:24:58 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.9 1995-02-06 00:52:15 claus Exp $
'!
!EnterBox2 class methodsFor:'documentation '!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.8 1994-10-28 03:24:58 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.9 1995-02-06 00:52:15 claus Exp $
"
!
@@ -83,12 +83,16 @@
self ok2Pressed
].
"
- the old (see superclass) ok-button is not a return-button
+ the old (see superclass) ok-button is no longer a return-button
"
okButton isReturnButton:false.
self resize.
enterField leaveAction:[:key | self ok2Pressed]
+!
+
+focusSequence
+ ^ Array with:enterField with:abortButton with:okButton with:okButton2
! !
!EnterBox2 methodsFor:'realization'!
@@ -135,4 +139,13 @@
"user pressed 2nd ok button - evaluate action"
self hideAndEvaluate:okAction2
+!
+
+keyPress:aKey x:x y:y
+ "return-key dublicates ok-function if acceptReturnAsOK is true"
+
+ acceptReturnAsOK ifTrue:[
+ (aKey == #Return) ifTrue:[^ self ok2Pressed]
+ ].
+ super keyPress:aKey x:x y:y
! !