HBObject() > Methods for object creation and initialization |
Creates a new instance of a class.
:new( [<params,...>] ) --> oInstance
The method returns a new instance of the class.
Method :new() is the only method that creates instances of a class. The method is special since it can only be used with the class function of a class, not with an object. This is the basic syntax pattern for creating a new object:
oNewObject := ClassFunction():new()
Note: it is not recommended to re-define the :new() method in a user-defined class.
http://www.xHarbour.com