--- a/EditFieldWithCompletion.st Sat Nov 19 00:45:19 2011 +0100
+++ b/EditFieldWithCompletion.st Sun Nov 20 09:42:38 2011 +0100
@@ -305,21 +305,29 @@
options := self entryCompletionBlock
valueWithOptionalArgument:oldContents
and:self.
- options ifNil:[ ^ self ].
+ options isNil ifTrue:[
+ ^ self
+ ].
best := options first.
options := options second.
- (options includes: best) ifFalse:
- [best := options detect:[:e|e asString startsWith: best asString] ifNone:[best]].
- options isSortedCollection ifFalse:
- [options := options asSortedCollection:
- [:a :b|a asString < b asString]].
+ (options includes:best) ifFalse:[
+ best := options
+ detect:[:e | e asString startsWith:best asString ]
+ ifNone:[ best ]
+ ].
+ options isSortedCollection ifFalse:[
+ options := options asSortedCollection:[:a :b | a asString < b asString ]
+ ].
self sensor
- pushUserEvent: #completion:options: for: self
- withArguments: (Array with: best with: options).
+ pushUserEvent:#completion:options:
+ for:self
+ withArguments:(Array with:best with:options).
"Created: / 26-07-2009 / 17:45:09 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 09-08-2009 / 02:51:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 09-02-2010 / 20:46:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 18-11-2011 / 14:33:56 / cg"
+ "Modified (format): / 20-11-2011 / 09:42:25 / cg"
!
hideOptionsWindow
@@ -390,7 +398,7 @@
!EditFieldWithCompletion class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.3 2011-08-04 14:25:07 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.4 2011-11-20 08:42:38 cg Exp $'
!
version_SVN