PrF UG classes replace superclass
Replacing a Superclass
You can move a class to a different superclass, using drag-and-drop in the Class Browser. This will remove the class from one superclass and make it a subclass of another superclass. Note that when you replace the superclass of a class, the class will often lose and gain inherited slots.
Moving a Class
To move a class:
Select the class you want to move. If the class has more than one superclass, select the view of the class that appears under the superclass you want to replace.
Hold down the mouse button and drag the class on top of the new superclass.
Release the mouse. The subclass will no longer be under the original superclass, but will now be located under the new superclass. Note that the slots of the moved class will automatically change to reflect the inheritance from its new superclass.
You can also add a superclass by holding down the Ctrl (Cmd) key while you drag.
Example
The following example shows how to make Columnist inherit from Employee, rather than the class Person.
Highlight Columnist in the Class Browser. Because Columnist has more than one superclass, you must make sure to select the copy of Columnist that is under Employee. (When a class has more than one superclass, you can use the Superclasses pane to select the copy that you want. See Jumping to a Different Superclass for more information.) Note that the Template Slots pane for Columnist includes slots it inherits from Employee.
Hold down the mouse button and drag Columnist on top of the new superclass Person.
Release the mouse button to drop the class. Person is outlined and the Class Browser redisplays to show the new hierarchy. The dragged class and all of its subclasses, if any, will be moved from the original superclass to the new superclass.
If you highlight Columnist after it has been repositioned, you will see that some of the slots it had before are now missing. These were the slots it inherited from Employee.