Method Abstract():new() Foundation

Creates instances of a class.

<ClassFunction>():new( [<paramList,...>] ) --> oInstance
The class function is usually called to retrieve the class object before :new() is executed.
The parameters passed to the :new() method are also passed to :init().

The method returns a new instance of a class.


:new() is the only method of a class object that creates new objects, or instances, of that class. This method cannot be overloaded. Immediately after the class object has created the instance, it calls the :init() method of the new object and passes the received parameters on to :init().


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.