EditFieldWithCompletion.st
branchjv
changeset 12123 4bde08cebd48
parent 10913 f91715a29502
child 12125 0c49a3b13e43
--- a/EditFieldWithCompletion.st	Fri Jan 27 22:18:53 2012 +0100
+++ b/EditFieldWithCompletion.st	Sun Jan 29 12:53:39 2012 +0000
@@ -305,46 +305,38 @@
     options := self entryCompletionBlock 
                 valueWithOptionalArgument:oldContents
                 and:self.
-    options isNil ifTrue:[
-        ^ self
-    ].
+    options ifNil:[ ^ 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
-    optionsWindow notNil ifTrue:[
-        optionsWindow destroy.
-        optionsWindow := nil.
-    ]
+    optionsWindow
+        ifNotNil:[
+            optionsWindow destroy.
+            optionsWindow := nil.
+        ]
 
     "Created: / 08-08-2009 / 23:23:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 09-08-2009 / 09:00:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
-    "Modified: / 29-11-2011 / 11:27:03 / cg"
 !
 
 showOptionsWindow
 
     showOptions ifFalse:[^ self].
-    optionsWindow notNil ifTrue:[ ^ self ].
+    optionsWindow ifNotNil:[ ^ self ].
 
     optionsView := SelectionInListModelView new
                     textStartLeft: textStartLeft - 2;
@@ -385,7 +377,6 @@
     "Created: / 09-08-2009 / 08:12:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 09-08-2009 / 09:28:47 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 09-12-2010 / 22:05:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 29-11-2011 / 11:27:13 / cg"
 !
 
 startCompletion
@@ -399,9 +390,9 @@
 !EditFieldWithCompletion class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.5 2011-11-29 10:27:19 cg Exp $'
+    ^ '§Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.3 2011/08/04 14:25:07 stefan Exp §'
 !
 
 version_SVN
-    ^ '§Id: EditFieldWithCompletion.st 7662 2010-12-09 21:05:19Z vranyj1 §'
-! !
+    ^ '$Id: EditFieldWithCompletion.st 7662 2010-12-09 21:05:19Z vranyj1 $'
+! !
\ No newline at end of file