Ad
Adding Categories To Classes In Pharo 9.0 (Smalltalk)
I've very recently started learning Pharo Smalltalk and my first assignment requires me to add three categories to a class, but the problem is that any information I find on the web is written before 2014, and the options are just not there anymore. How can I add categories to classes in Pharo 9.0?
Ad
Answer
I presume that the assignment consists in adding categories programmatically. In that case, this is how you could learn how to add a category.
- Find the class you want to add the category to
- Inspect the class and take a look to its instvars
- The categories of the class should be there somehow
- The ivar whose name looks promising is
organization
- Its class is
ClassOrganizer
- Check to see whether there is a
ClassOrganizerTest
for testing it - Found! Take a look at the tests and see if you can find what you are looking for.
Ad
source: stackoverflow.com
Related Questions
- → How to update data attribute on Ajax complete
- → how to convert stdclass into string
- → How to dynamically add class to parent div of focused input field?
- → Throttling dispatch in redux producing strange behaviour
- → Mysterious syntax onClick={::this.submit}
- → Browser support for class syntax in Javascript
- → Get the calling element with vue.js
- → Using css modules how do I define a global class
- → Confirming Navigation with React Router without Mixin for es6 Classes
- → redux how to redirect on componentWillMount using react-router
- → Function Undefined in Axios promise
- → Maximum call stack exceeded when instantiating class inside of a module
- → List class element(index).fadetoggle(some speed) not working
Ad