Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.537.mcz==================== Summary ====================
Name: System-fbs.537
Author: fbs
Time: 21 May 2013, 11:08:04.602 pm
UUID: 1c8760f1-e0c4-42b2-95d4-17791443718f
Ancestors: System-fbs.536
* Pull the big chunk o' code into a block so we can see that we iterate over both instance- and class-side.
* Add the #environment accessor I should have added in the last commit.
=============== Diff against System-fbs.536 ===============
Item was added:
+ ----- Method: MethodReference>>environment (in category 'accessing') -----
+ environment
+ ^ environment.!
Item was changed:
----- Method: SystemNavigation>>allMethodsSelect:localTo: (in category 'query') -----
allMethodsSelect: aBlock localTo: aClass
"Answer a SortedCollection of each methodr in, above, or below the given
class that, when used as the argument to aBlock, gives a true result."
+ | aSet collectInSet |
- | aSet |
aSet := Set new.
+ collectInSet := [:class |
+ class selectorsAndMethodsDo:
+ [:aSelector :aMethod|
+ (aBlock value: aMethod) ifTrue:
+ [aSet add: (MethodReference class: class selector: aSelector)]]].
Cursor wait showWhile:
+ [aClass theNonMetaClass
+ withAllSuperAndSubclassesDoGently: collectInSet.
+ aClass theNonMetaClass class
+ withAllSuperAndSubclassesDoGently: collectInSet].
- [aClass theNonMetaClass withAllSuperAndSubclassesDoGently:
- [:class |
- class selectorsAndMethodsDo:
- [:aSelector :aMethod|
- (aBlock value: aMethod) ifTrue:
- [aSet add: (MethodReference class: class selector: aSelector)]]].
- aClass theNonMetaClass class withAllSuperAndSubclassesDoGently:
- [:class |
- class selectorsAndMethodsDo:
- [:aSelector :aMethod|
- (aBlock value: aMethod) ifTrue:
- [aSet add: (MethodReference class: class selector: aSelector)]]]].
^aSet!