--- a/EditField.st Wed Jan 24 16:29:41 1996 +0100
+++ b/EditField.st Wed Jan 24 19:04:30 1996 +0100
@@ -143,6 +143,7 @@
acceptOnTab <Boolean> if true, the Tab key accepts and leaves the field.
If false, Tabs are entered into the contents field like
ordinary non-control keys.
+ AcceptOnTab is ignored if the entryCompletion block is nonNil.
Default is true.
lengthLimit <Number> the max. number of allowed characters
@@ -151,7 +152,7 @@
when Tab is pressed.
Entry completion is used with Filenamefields or in the
browser for classname/selector completion.
- This feature is disabled when acceptOnTab is true.
+ Setting a nonNil entryCompletion disables acceptOnTab.
passwordCharacter <CharacterOrNil> if non-nil, typed input is replaced by this character
for display. Used for secret-input fields (such as password entry).
@@ -1226,17 +1227,17 @@
(key == #Tab) ifTrue:[
tabAction notNil ifTrue:[tabAction value. ^ self].
- acceptOnTab ifTrue:[
- leave := true
+ entryCompletionBlock notNil ifTrue:[
+ s := self contents.
+ s isNil ifTrue:[
+ s := ''
+ ] ifFalse:[
+ s := s asString
+ ].
+ entryCompletionBlock value:s. ^ self
] ifFalse:[
- entryCompletionBlock notNil ifTrue:[
- s := self contents.
- s isNil ifTrue:[
- s := ''
- ] ifFalse:[
- s := s asString
- ].
- entryCompletionBlock value:s. ^ self
+ acceptOnTab ifTrue:[
+ leave := true
]
]
].
@@ -1544,5 +1545,5 @@
!EditField class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.39 1996-01-24 12:37:49 ah Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.40 1996-01-24 18:04:30 cg Exp $'
! !