[squeak-dev] The Trunk: ToolBuilder-Morphic-ul.76.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 14 22:56:40 UTC 2011


Levente Uzonyi uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ul.76.mcz

==================== Summary ====================

Name: ToolBuilder-Morphic-ul.76
Author: ul
Time: 14 March 2011, 11:56:35.317 pm
UUID: 610deaa7-94fb-5148-84ae-1502dc241b84
Ancestors: ToolBuilder-Morphic-ul.75

Show prefix matches at the front of the list in ListChooser. Select "find class..." from the browser menu and type Object to see the difference.

=============== Diff against ToolBuilder-Morphic-ul.75 ===============

Item was changed:
  ----- Method: ListChooser>>updateFilter (in category 'event handling') -----
  updateFilter
  	selectedItems := 
  		searchText isEmptyOrNil 
  			ifTrue: [ fullList ]
+ 			ifFalse: [ 
+ 				| prefixMatches otherMatches |
+ 				prefixMatches := OrderedCollection new.
+ 				otherMatches := OrderedCollection new.
+ 				fullList do: [ :each | 
+ 					| index |
+ 					index := each findString: searchText startingAt: 1 caseSensitive: false.
+ 					index = 1 ifTrue: [ prefixMatches add: each ].
+ 					index > 1 ifTrue: [ otherMatches add: each ] ].
+ 				prefixMatches
+ 					addAllLast: otherMatches;
+ 					yourself ].
- 			ifFalse: [ fullList select: [ :each | each includesSubstring: searchText caseSensitive: false  ] ].
  	self changed: #list.
  	self selectedIndex: 1.
  	self changed: #selectedIndex.!




More information about the Squeak-dev mailing list