Difference between revisions of "PrF UG meta change meta"
Line 24: | Line 24: | ||
</p> | </p> | ||
<div>[[Image:PrF_UG_meta_select_superclass.png|frame|none| | <div>[[Image:PrF_UG_meta_select_superclass.png|frame|none| | ||
− | Class Browser, White wine selected]]</div> | + | Class Browser, "White wine" selected]]</div> |
<li><p> | <li><p> | ||
Line 30: | Line 30: | ||
</p> | </p> | ||
<div>[[Image:PrF_UG_meta_change_metaclass.png|frame|none| | <div>[[Image:PrF_UG_meta_change_metaclass.png|frame|none| | ||
− | Change Metaclass... selected]]</div> | + | "Change Metaclass..." selected]]</div> |
<li><p> | <li><p> | ||
Line 40: | Line 40: | ||
</p> | </p> | ||
<div>[[Image:PrF_UG_meta_select_metaclass.png|frame|none| | <div>[[Image:PrF_UG_meta_select_metaclass.png|frame|none| | ||
− | Select Metaclass dialog, Wine template selected]]</div> | + | Select Metaclass dialog, "Wine template" selected]]</div> |
<li><p> | <li><p> |
Revision as of 02:46, October 23, 2008
Changing the Metaclass of a Class
For any existing class in your project, you can change the metaclass used for that class. This gives the class and the Class Editor the attributes defined by the newly-assigned metaclass. New classes that you create as subclasses of the class will also use the new metaclass. However, each existing subclass will continue to use its previously assigned metaclass unless you specifically change it.
This example uses the wines project, which includes a Wine template that supplies metaclass structure.
To change the metaclass of an existing class:
In the Class Browser, click on the class that you want to change.
Click the right mouse button and select "Change metaclass...".
A dialog box will display the Concrete metaclasses, which are the classes you can use. You cannot use Abstract metaclasses in this way. Note that if the class currently uses a non-standard class, you can revert to :STANDARD-CLASS.
Select the metaclass that has the properties you want and click OK. The highlighted class will now have the Class Editor from the selected metaclass, with entry fields determined by the template slots of the metaclass. The name of the metaclass you used will be displayed at the top of the Class Editor, immediately after the name of the class.