Re: [Vala] vala-list Digest, Vol 61, Issue 7



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


Am Sonntag, den 16.12.2012, 17:41 +0100 schrieb Nadir Sampaoli:
Have you tried including signal modifier in overridden method too? This way:

    public class A : GLib.Object {
      public virtual signal void func () {}
    }


    public class B : A {
      public override signal void func () {}
    }


2012/12/16 <vala-list-request gnome org>

Send vala-list mailing list submissions to
        vala-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.gnome.org/mailman/listinfo/vala-list
or, via email, send a message with subject or body 'help' to
        vala-list-request gnome org

You can reach the person managing the list at
        vala-list-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of vala-list digest..."


Today's Topics:

   1. Defining new virtual signal is possible,  but overring it
      isn't. (Tal Hadad)


----------------------------------------------------------------------

Message: 1
Date: Sat, 15 Dec 2012 21:00:24 +0200
From: Tal Hadad <tal_hd hotmail com>
To: Vala Mail List <vala-list gnome org>
Subject: [Vala] Defining new virtual signal is possible,        but
overring
        it isn't.
Message-ID: <DUB118-W23290D650216AC80E0291BE54C0 phx gbl>
Content-Type: text/plain; charset="windows-1255"


When I try to:
public class A : GLib.Object {
  public virtual signal void func () {}
}


public class B : A {

  public override void func () {}

}

I get an error from Valac:
error: B.func: no suitable method found to override

I'm using Vala 0.16.1

I think that this is a critical bug in Vala, or my code is wrong?

Thanks,
Tal


------------------------------

_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list


End of vala-list Digest, Vol 61, Issue 7
****************************************

_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list





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