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

Alexander Lazarević laza at blobworks.com
Tue Mar 15 10:05:44 UTC 2011


Yes, that's better!

2011/3/14 <commits at source.squeak.org>

> 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.!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110315/fdb65f17/attachment.htm


More information about the Squeak-dev mailing list