unom
unom

Reputation: 11476

Pharo Smalltalk - How can I list all the classes in a Category (aka Package or Tag)?

Pharo Smalltalk - How can I list all the classes in a Category?

In the System Browser, the first pane contains the Category under which all my classes are listed. Is there a list of those classes programmatically?

Upvotes: 2

Views: 838

Answers (1)

Uko
Uko

Reputation: 13386

You can list all classes like

(RPackageOrganizer default packageNamed: 'Kernel') definedClasses

You can also use

(RPackageOrganizer default packageNamed: 'Kernel') classTags

to get all tags in the package (previously known as packages) and for each you can send #classes to get the classes of the tag

Upvotes: 2

Related Questions