Nicolas Cellier uploaded a new version of FlexibleVocabularies to project The Trunk:
http://source.squeak.org/trunk/FlexibleVocabularies-nice.8.mcz==================== Summary ====================
Name: FlexibleVocabularies-nice.8
Author: nice
Time: 21 October 2009, 12:23:42 pm
UUID: 61602f5c-768f-48f1-93df-8fd78c437f76
Ancestors: FlexibleVocabularies-nice.7
Use #keys rather than #fasterKeys
Note that pattern (x keys asArray sort) could as well be written (x keys sort) now that keys returns an Array...
This #asArray is here solely for cross-dialect/fork compatibility.
=============== Diff against FlexibleVocabularies-nice.7 ===============
Item was changed:
----- Method: Morph class>>unfilteredCategoriesForViewer (in category '*flexibleVocabularies-flexiblevocabularies-scripting') -----
unfilteredCategoriesForViewer
"Answer a list of symbols representing the categories to offer in the viewer for one of my instances, in order of:
- masterOrderingOfCategorySymbols first
- others last in order by translated wording"
"
Morph unfilteredCategoriesForViewer
"
| aClass additions masterOrder |
aClass := self.
additions := OrderedCollection new.
[aClass == Morph superclass ] whileFalse: [
+ additions addAll: (aClass allAdditionsToViewerCategories keys
- additions addAll: (aClass allAdditionsToViewerCategories fasterKeys
sort: [ :a :b | a translated < b translated ]).
aClass := aClass superclass ].
masterOrder := EToyVocabulary masterOrderingOfCategorySymbols.
^(masterOrder intersection: additions), (additions difference: masterOrder).!
Item was changed:
----- Method: Morph>>categoriesForViewer (in category '*flexiblevocabularies-scripting') -----
categoriesForViewer
"Answer a list of symbols representing the categories to offer in the
viewer, in order"
| dict |
dict := Dictionary new.
self unfilteredCategoriesForViewer
withIndexDo: [:cat :index | dict at: cat put: index].
self filterViewerCategoryDictionary: dict.
+ ^ dict keys asArray sort: [:a :b | (dict at: a)
- ^ dict fasterKeys sort: [:a :b | (dict at: a)
< (dict at: b)]!