Status: New
Owner: ----
Labels: Milestone-1.3 Type-Bug
New issue 5559 by
[hidden email]: hierarchySendersOf: broken
http://code.google.com/p/pharo/issues/detail?id=5559"Senders in hierarchy..." in the OB is broken; it misses senders on the
class side.
Here is fixed code, which is also MUCH faster:
hierarchySendersOf: aSelector
| hierarchySenders hierarchyClasses |
hierarchyClasses := (self theClass withAllSuperclasses , self theClass
allSubclasses)
collect: [:each | each name].
hierarchySenders := (SystemNavigation default allCallsOn: aSelector)
select: [:ea | (hierarchyClasses includes: ea classSymbol)].
^ hierarchySenders collect: [:ref | OBMessageNode on: aSelector
inMethodReference: ref]
However, that (and the original code) duplicates functionality that is
already in SystemNavigator. So this is better:
hierarchySendersOf: aSelector
| hierarchySenders |
hierarchySenders := SystemNavigation default allCallsOn: aSelector
localTo: self theClass.
^ hierarchySenders collect: [ :ref | OBMessageNode on: aSelector
inMethodReference: ref ]
The above code provokes a bug in SystemNavigation>>allCallsOn:localTo:,
which sends withAllSuperAndSubclassesDoGently:, which no longer exists.
IIRC, the "...DoGently" methods avoided bringing into memory classes that
had been swapped out. Since that is no longer a problem, I think that it's
fine to fix SystemNavigation by replacing the ...DoGently: iterators with
the ordinary ...Do: iterators.
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker