Method Abstract():new() Foundation

Creates instances of a class.

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

The method returns a new instance of a class.

Description

: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().

Feedback

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.