[Gambas-user] inheritance

Fabien Bodard gambasfr at ...11...
Sat Nov 19 22:05:50 CET 2005


Le Jeudi 17 Novembre 2005 11:56, Josemar a écrit :
> hi
> how to inheritance in gambas ?
> tks
>
>

simply like that :


'Class1, file

Property Read MyDate as Date
Function read MyDate() as date
	return Now()
end


'Class2
INHERITS Class1



That's all :)

In fact ... use gambas2 to have a better inheritance toolkit.

You can inherits a class and call the inherited class public properties via 
the SUPER keyword.

It's not a perfect explanation i know... but create a small project and play 
with inheritance...

look at the help too

Regards,
Fabien Bodard





More information about the User mailing list