Home Segments Index Top Previous Next

371: Mainline

In some versions of Smalltalk, pool dictionaries are inherited; in other versions they are not. Accordingly, if you want to be sure that the variables in a dictionary are available by name, you should include an explicit reference to that dictionary in every class for which there are methods that need access to the dictionary. For example, you should identify the CalorieGramRatios dictionary as a pool dictionary in the Vegetable class if you wish to use values from that dictionary in Vegetable methods, even if you have already identified the CalorieGramRatios dictionary as a pool dictionary in the Food class.