[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Invoking Inititalizers
In the init() method of a multiply inherited class, it is usually
necessary to invoke the initializers of all direct parent classes. Since
the METHOD definition command only allows a single parent initializer
to be invoked, it is best to invoke parent initializers explicitly. For
example, assume a class is multiply inherited from two classes, x and y.
The init method in the subclass should then look something like this:
METHOD init(...)
::x:init(...)
::y:init(...)
//...
RETURN self
This makes use of scope resolution messages to invoke the correct method
in the specified parent class. Scope resolution messages are discussed
further in the following sections.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson