How do I find the RPackageTag of a class?
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
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@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
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@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@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 > > >
participants (2)
-
Denis Kudriashov -
Tim Mackinnon