[Pharo-users] How do I find the RPackageTag of a class?

Denis Kudriashov dionisiydk at gmail.com
Sat Feb 16 07:18:27 EST 2019


Hi Tim.

aPackage classTagForClass: aClass

Calypso shows more kind of children than just a package tags. And it can be
extended. That's the reason why you don't have raw packageTag there.

Also in Pharo 6 new API was introduced to handle tags of classes and
methods in similar way
https://pharo.manuscript.com/f/cases/19341/New-class-and-method-tags-API.



чт, 14 февр. 2019 г. в 13:40, Tim Mackinnon <tim at testit.works>:

> Actually - I’ve realised that Calypso can give me the tag name from its
> context - (aToolContext lastSelectedClassGroup).
>
> However it does highlight a very strange package/tag design. Are you not
> supposed to be easily able to derive RPacakgeTags?
>
> Tim
>
> > On 14 Feb 2019, at 13:19, Tim Mackinnon <tim at testit.works> wrote:
> >
> > I’m trying to understand how RPackage and RPackageTag work in Pharo7? It
> seems different than Pharo6 at least with Nautilus (vs Calypso) - as
> previously the Nautilus UI gave me the RPacakgeTag, and I could just work
> with that. Calypso doesn’t seem to give me the tag object, but if I have a
> known class and I want to know its RPackageTag I can’t see how you do it?
> It all seems rather messy….
> >
> > I can ask a class for its category - which just gives me a symbol of the
> form “mypackage-tagname”, and if I ask a class for its package, it will
> give me an RPackage(myPackage) - but that RPackage has a set of
> RPackageTags which just use the tagname (so not prefixed with
> "mypackage-“)? So am I really supposed to split the category name on “-“
> myself, and then select the correct RPackageTag?
> >
> > If I look at the RPackageTag tests - they all seem to use hard coded
> values and so don’t really show you how you deal with the question above?
> >
> > It really seems quite messy?
> >
> > I naively thought that if I wanted a browser extension to deal with a
> selected package tag - and file out some classes in that tag (for exercism)
> - I could easily get the RPackageTag from any class and then use it?
> >
> > Tim
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20190216/0930b9b4/attachment.html>


More information about the Pharo-users mailing list