[Gambas-user] problems with inheritance
José Luis Redrejo
jredrejo at ...626...
Thu Dec 21 13:47:43 CET 2006
Hi, I'm having problems using inheritance and method overriding between more
than two classes. I don't know if it's a bug, or just I'm not doing it
correctly. This is the problem:
Class1 has a sub called translate(aText as String)
Class1 inherits from Class2 and Class2 inherits from Class3. Both Class3 &
Class2 have also the translate sub, with the
same sintax in the definition.
In class1 sub translate I have:
super.translate(aText)
....more actions...
and the same in Class2 sub translate.
Doing
objecto=New Class1
objeto.translate("whatever")
causes a stack overflow in method translate in Class2.
If I only have two classes it works ok, but with three classes I always get
the same error.
So: is it a bug r am I doing something wrong?
Regards
José L.
More information about the User
mailing list