A class extension partitions groups of methods (or behavior) for the same class across multiple applications. Multiple extensions to the same class can exist at the same time in your image. You can see an example of multiple extensions when browsing the class
Object in a Classes Browser. In the Smalltalk development environment, the class
Object is defined in the subapplication
Core, and extended in subapplications
CLDT and
CLIM. The behavior in class
Object that supports
CLDT and
CLIM is partitioned into those subapplications for flexibility and ease of maintenance. Extending a class also provides a convenient mechanism to add (not modify) behavior to the base system classes (for example, within the application
Kernel).
Suppose that you want to add a method to Object. You can add to the behavior of class
Object; but you can modify only the class or add to its parent subapplication if you have privileges to do so. If you do not have such privileges, you can extend
Object in your application, and then add the necessary method to the extension. To extend
Object from
DevelopChooser, do the following: