Hi Jordi,

a) MethodReference is gone from Pharo20 and replaced by the RGMethodDefinition.
   But in many cases the tools working with RGMethodDefinition also work on 
CompiledMethods.

b) http://forum.world.st/Ring-model-infrastructure-for-Pharo-td3081971.html

So your code example can be simplified a bit

class := Collection.
SystemNavigation default
 browseMessageList: (class withAllSubclasses gather: [ :each |
   each methodDict select: [ :method| method sendsToSuper ]])
 name: 'Supersends of ' , class name , ' and its subclasses'



On 2012-10-03, at 13:10, Jordi Delgado <[email protected]> wrote:

> Hi,
> 
> Just a question regarding this example I would like to teach (PBE p. 298). 
> The code:
> 
> | class |
> class := Collection.
> SystemNavigation default
>  browseMessageList: (class withAllSubclasses gather: [:each |
>    each methodDict associations
>      select: [:assoc | assoc value sendsToSuper]
>      thenCollect: [:assoc | MethodReference class: each selector: assoc key]])
>  name: 'Supersends of ' , class name , ' and its subclasses'
> 
> does not work in current Pharo. 
> 
> I did the following, after browsing the system a little bit. First I changed 
> 'MethodReference'
> for 'RGMethodDefinition' and defined a new method 'Object class >> realClass  
>  ^self'
> (this is because the system complained that 'Array class' did not understand 
> 'realClass')
> 
> Now it works, but I do not really understand why. 
> 
> My questions are: 
> a) Is there a canonical way of doing what was usually done with 
> 'MethodReference'?
>   (I do not think that substituting 'MethodReference' for 
> 'RGMethodDefinition' is
>    the right answer)
> b) What is the 'Ring'? (besides an evil organization from the show 'Chuck' :))
> 
> Thanks in advance,
> 
> Bests,
> 
> Jordi
> 
> PS: I know I am being lazy, ok? I am still getting to grips with current 
> Pharo after more than
> one year without using it. I am working on it... Any help will be really 
> appreciated.
> 


Reply via email to