[Gambas-user] gambas inheritance en protected members

Bodard Fabien gambasfr at ...11...
Sat Jan 29 16:20:09 CET 2005


Le jeudi 27 Janvier 2005 23:06, bp a écrit :
> hello,
>
> I don't really understand how gambas inheritance works.
> I try to write this :
>
> A first class with one member and one method which is named 'father'
>
> ' Gambas class file father
> PUBLIC myvar AS Integer
> PUBLIC FUNCTION test(var AS Integer) AS Boolean
>     RETURN FALSE
>   END
>
> A second class named "son" which inherits from the first one
>
> ' Gambas class file
> INHERITS father
> PUBLIC FUNCTION test (var AS Integer) AS Boolean
     RETURN ( var = Me.myvar)             <==== correction
>   END
>
> And the compilation aborts on the second class on myvar.
>
> Can you help me ?
>
> bp
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

Fabien Bodard





More information about the User mailing list