--- a/EditField.st Sat Aug 19 17:57:03 1995 +0200
+++ b/EditField.st Wed Aug 23 20:06:29 1995 +0200
@@ -15,7 +15,7 @@
EditTextView subclass:#EditField
instanceVariableNames:'leaveAction enabled enableAction crAction tabAction converter
leaveKeys immediateAccept acceptOnLeave acceptOnReturn
- lengthLimit'
+ lengthLimit entryCompletionBlock'
classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
DefaultSelectionForegroundColor DefaultSelectionBackgroundColor
DefaultFont'
@@ -27,7 +27,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.26 1995-07-03 02:32:46 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.27 1995-08-23 18:05:07 claus Exp $
'!
!EditField class methodsFor:'documentation'!
@@ -48,7 +48,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.26 1995-07-03 02:32:46 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.27 1995-08-23 18:05:07 claus Exp $
"
!
@@ -586,6 +586,12 @@
^ list at:1
!
+entryCompletionBlock:aBlock
+ "define an action to be evaluated when Tab (NameCompletion) is pressed"
+
+ entryCompletionBlock := aBlock
+!
+
leaveAction:aBlock
"define an action to be evaluated when field is left by return key"
@@ -938,6 +944,9 @@
(key == #Tab) ifTrue:[
tabAction notNil ifTrue:[tabAction value. ^ self].
+ entryCompletionBlock notNil ifTrue:[
+ entryCompletionBlock value. ^ self
+ ]
].
(key == #Return) ifTrue:[
crAction notNil ifTrue:[crAction value. ^ self].