2012/12/17 JM <[email protected]>

> Interesting. But this feature seems undocumented, I cannot find it in
> the tutorial.
>
>
> Am Sonntag, den 16.12.2012, 20:20 +0100 schrieb Jonas Kulla:
> > 2012/12/16 JM <[email protected]>
> >
> > > Overriding a signal or making it virtual does not really make sense,
> > > does it?
> > > A signal does not have a body, as a function would have and signature
> is
> > > always the same, even in child classes.
> > >
> > >
> > > Also your example seems weird, as you have bodys for signals.
> > >
> > > Regards
> > >
> >
> > No, signals in Vala can be virtual and can have bodies.
> > GObject offers so called "default handles" for signals,
> > which can be specified as an offset in the class struct to the handler
> > function pointer. Because the handler is in the class struct,
> > it can be "overriden" by subclasses, hence the analogy "virtual signal".
> > Vala translates the signal body to a virtual function and sets it as the
> > default handler for the signal.
> >
> >  - Jonas
> > _______________________________________________
> > vala-list mailing list
> > [email protected]
> > https://mail.gnome.org/mailman/listinfo/vala-list
>
>
> _______________________________________________
> vala-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/vala-list
>


Indeed, it is not to be found in the main tutorial.
It is however explained here<https://live.gnome.org/Vala/SignalsAndCallbacks>
.

Tal, I tried compiling your example with Vala 1.8,
and there were no errors.

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

Reply via email to