Sort items in in completion list.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 18 Sep 2013 02:04:24 +0100
changeset 94 9f2c651d0437
parent 93 f50bd9fded52
child 95 78bcbdfd9361
Sort items in in completion list.
SmallSense__CompletionWindow.st
--- a/SmallSense__CompletionWindow.st	Wed Sep 18 01:32:07 2013 +0100
+++ b/SmallSense__CompletionWindow.st	Wed Sep 18 02:04:24 2013 +0100
@@ -128,7 +128,7 @@
 
     t := self textHolder value.
     self listHolder value isNil ifTrue:
-        [self listHolder value:result items].
+        [self listHolder value:(result items asSortedCollection:[:a :b | a label < b label ])].
     [ t size > 0 ] whileTrue:[
         result items withIndexDo: [:e :i| 
             (e startsWith: t) ifTrue: [
@@ -148,7 +148,7 @@
     "
 
     "Created: / 04-04-2011 / 15:43:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 26-11-2011 / 19:25:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-09-2013 / 01:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !CompletionWindow methodsFor:'events'!