[squeak-dev] The Trunk: EToys-nice.39.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Oct 20 22:36:33 UTC 2009
Nicolas Cellier uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-nice.39.mcz
==================== Summary ====================
Name: EToys-nice.39
Author: nice
Time: 21 October 2009, 12:35:48 pm
UUID: 22cec4db-e41b-4005-a856-1dbaa7d1a86a
Ancestors: EToys-nice.38
forgot one #asArray sort
=============== Diff against EToys-nice.38 ===============
Item was changed:
----- Method: EToyVocabulary>>allMethodsInCategory:forInstance:ofClass: (in category 'method list') -----
allMethodsInCategory: aCategoryName forInstance: anObject ofClass: aClass
"Answer a list of all methods in the etoy interface which are in the given category, on behalf of anObject, or if it is nil, aClass"
| aCategory unfiltered suitableSelectors isAll |
aCategoryName ifNil: [^ OrderedCollection new].
aClass isUniClass ifTrue:
[aCategoryName = ScriptingSystem nameForScriptsCategory ifTrue:
[^ aClass namedTileScriptSelectors].
aCategoryName = ScriptingSystem nameForInstanceVariablesCategory ifTrue:
[^ aClass slotInfo keys asArray sort collect:
[:anInstVarName | Utilities getterSelectorFor: anInstVarName]]].
unfiltered := (isAll := aCategoryName = self allCategoryName)
ifTrue:
[methodInterfaces collect: [:anInterface | anInterface selector]]
ifFalse:
[aCategory := categories detect: [:cat | cat categoryName = aCategoryName]
ifNone: [^ OrderedCollection new].
aCategory elementsInOrder collect: [:anElement | anElement selector]].
(anObject isKindOf: Player) ifTrue:
[suitableSelectors := anObject costume selectorsForViewer.
unfiltered := unfiltered select:
[:aSelector | suitableSelectors includes: aSelector]].
(isAll and: [aClass isUniClass]) ifTrue:
[unfiltered addAll: aClass namedTileScriptSelectors.
+ unfiltered addAll: (aClass slotInfo keys asArray sort collect:
- unfiltered addAll: (aClass slotInfo keys sort collect:
[:anInstVarName | Utilities getterSelectorFor: anInstVarName])].
^ (unfiltered copyWithoutAll: #(dummy unused)) asSortedArray!
More information about the Squeak-dev
mailing list
|