281
RENAME CLASS Directive
Change Name of Class
Format
RENAME CLASS old_name$ TO new_name
Where:
new_name$ New name for the class.
old_name$
Previously defined class to be renamed.
TO
Mandatory keyword, not case-sensitive.
Description
The RENAME CLASS directive is used in Object Oriented Programming (OOP) to
alter the name of a previously defined class. This functionality allows the application
designer to alter an existing object class easily, without having to change programs.
Example
If you had an existing application with a Product class object but needed to add a
new field to the object, such as Lot_Number:
RENAME CLASS "Product" TO "Orig_Product"
DEF CLASS "Product"
LIKE "Orig_Product"
PROPERTY Lot_Number
END DEF
All subsequent uses of a Product class object would be identical now to the
standard Product class and also have the property LOT_NUMBER.
See Also