[Gambas-user] how to make a class of a class

Benoît Minisini gambas at ...1...
Fri Jan 10 10:34:12 CET 2003


Le Vendredi 10 Janvier 2003 09:59, NN a écrit :
> Hi Jochen
>
> I have no answer as a quickshot :( , but if you'll
> receive a proper answer, put this topic to your
> doku. I'll need it soon I assume.
>
> regs juergen
>
> 03-01-10 09:09:59, Jochen Georges <jochen.georges at ...22...> wrote:
> >hello
> >
> >how can i extend a class of a class in gambas?
> >like this:
> >
> >public class Auto{
> >	public String name;
> >	public String color;
> >	public int    power;
> >}
> >
> >
> >class Cabrio extends Auto{
> >	int age;
> >}
> >
> >
> >thanks for any hint!
> >
> >beste gruesse
> >jochen
> >

I'm going to tell you a secret, don't tell it !

You can extend a class in Gambas with single inheritance, like in Java ! But I 
didn't document it because I'm not sure there is no quirks with it :-(

At the moment, this inheritance mechanism is used when you create a Form in 
the IDE. The generated class inherits the Form class of the gb.qt component.

I'm not sure it is a good idea to make this feature public, as I can change it 
at any moment. I'd rather wait.

If you insist, I will tell you :-)

-- 
Benoît Minisini
mailto:gambas at ...1...




More information about the User mailing list