[Pharo-project] How to filter out method extensions in Ring?

Hernán Morales Durand hernan.morales at gmail.com
Wed Jul 25 14:25:22 EDT 2012


Thanks Verónica, now it works fine.

I have one more question :) it is possible with Ring to query if a package
is a "system" package? (included in the downloaded image). We've been
talking about that feature in the list
http://lists.gforge.inria.fr/pipermail/pharo-project/2009-December/018168.htmlbut
no solution was proposed.

Hernán

2012/7/25 Veronica Isabel Uquillas Gomez <vuquilla at vub.ac.be>

> Hi Hernan,
>
> Sorry, I have been totally disconnected because of my thesis.
>
> Ok I quickly reply...
> You need to instantiate methods with #realClass:selector: to manipulate
> objects from the image..
> otherwise, they are static (within a ring source model). The category is
> not assigned then is not possible to know if they are from a class
> extension.
>
>  ArrayedCollection selectors asSortedCollection collect: [ : each |
>     RGMethodDefinition
>         realClass: ArrayedCollection
>         selector: each  ]
>
> then you can use:   aRGMethod isExtension
>
> Cheers,
> Veronica
>
> On 23 Jul 2012, at 13:45, Hernán Morales Durand wrote:
>
> > Hello all,
> > You may help me on this one. I want to filter out method selectors which
> are extensions of a particular class. For example, in Pharo 1.4 the
> ArrayedCollection class has these selectors:
> > ArrayedCollection selectors asSortedCollection
> >
> > I would want all of them except #writeOnGZIPByteStream: which is in
> "Compression" package. I did a try to Ring
> >
> > ArrayedCollection selectors asSortedCollection collect: [ : each |
> >     RGMethodDefinition
> >         class: ArrayedCollection
> >         selector: each ]
> >
> > with MethodReference I did :
> >
> >  ... ( each category beginsWith: '*'  ) not ...
> >
> > but it seems not supported in Ring? Any hints?
> >
> > Cheers,
> >
> > Hernán
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120725/566fcef5/attachment-0001.html>


More information about the Pharo-dev mailing list