[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Alternate Constructors
Constructor messages other than new() can be declared using the
CONSTRUCTOR clause of the METHOD (declaration) command, as
follows:
METHOD <methodName> CONSTRUCTOR
or:
METHOD <methodName> CTOR // abbreviated form
Each constructor message declared in this way must have a corresponding
initializer method defined in that class. The initializer method should
have the same name as the constructor message.
When such a constructor message is sent to a class, it invokes a
predefined system method (called altNew) which creates a new object
and sends the appropriate initializer message to the new object.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson