ProvideX V8.20 > Language Reference > 2. Directives
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
Object Oriented Programming, p.21
DEF CLASS Define Object Class, p.64
DROP CLASS Delete Class Definition, p.101
DROP OBJECT Delete Object, p.103
FUNCTION Declare Object Method, p.136
LIKE Inherit Properties, p.173
LOAD CLASS Pre-Load Class Definition, p.194
LOCAL Designation of Local Data, p.196
PROGRAM Create/Assign Program File, p.257
PROPERTY Declare Object Properties, p.259
STATIC Add Local Properties at Runtime, p.327
NEW( ) Function, p.487
REF( ) Function, p.510