In WinDev, I have a base class, let say BaseClass
. This base class has a constructor:
PROCEDURE CONSTRUCTOR(param1, param2, param3)
I have a first child class that extends the base class, let say childClass1
. This first child has a constructor with the only 2 firsts arguments:
ChildClass1 is a class inherits from BaseClass
...
PROCEDURE CONSTRUCTOR(param1, param2)
Constructor BaseClass(param1, param2, 1)
And I would like to have a class that inherits from ChildClass1
but uses the constructor from BaseClass
. It seems impossible without redefinning the 3 parameters constructor of BaseClass
inside the ChildClass1
.
Here is what I tried to do:
ChildClass2 is a class inherits from ChildClass1
...
PROCEDURE CONSTRUCTOR(param1, param2)
Constructor BaseClass(param1, param2, 2)
But is says that BaseClass
is neither a base class or a member of ChildClass1
.
Does the only solution is to redefine the constructor of BaseClass
inside ChildClass1
so that ChildClass2
can use it?
This seems as a lack of OOP handling.
Cheers,