Hello,

Frederic LEGER <fredato...@...> writes:
> I found a problem with the interface and the inherance. Possibly the problem
> is mine, not in the compiler.
> Anyway that would have been great if it was working as I was expecting...
> 
> some days ago I created the class  Rectangle, and interface Affichable...
> today, I created the class  RectangleG which derives from Rectangle and
> implements the interface Affichable
> 
> And stupidly, Rectangle implemented a few methods of the Affichable
> interface..... that raises in a strange case for me....

I don't think any non-dynamic language works as you expect, that is
automatically use methods defined in base class as interface implementation.
You always have to overload the methods (trivially calling the base
implementation) to have the class accepted as implementing the interface.

Now what would be good is if vala supported explicit interface implementations
(i.e. you could have the interface method implemented differently than
method of the same name of the class itself -- it's perfectly doable with
GObject), but that's another matter.

Regards,
Jan

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to