Re: [Vala] Overriding Gtk.Container.forall (...)



Sam Liddicott wrote:
* Frederik wrote, On 18/07/08 10:24:
Sam Liddicott wrote:
Perhaps the virtual one would also have to be abstract?
'abstract' would mean I am forced to override and implement the method
when subclassing because there was no implementation, but Gtk.Container
is not an abstract class and already has a default implementation for
'forall'.
When you said:

If Vala would see that there are two definitions it could automatically
choose the virtual one for overriding and the other one for invocation.
The vapi generator would have to be aware that virtual and non-virtual
signature may differ.

I presumed you meant that in subclasses where the virtual one was
overridden it would then be used for invocation instead of the other one.

That sounds like abstract, to me.

Ok, the first function is abstract in that respect that it doesn't have
a single fitting wrapper method, as Yu wrote. Instead it has two wrapper
methods: gtk_container_forall() and gtk_container_foreach() which call
the first one with TRUE or FALSE as parameter.

Regards,

Frederik



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]