Re: [Vala] connect_after



Thanks! That solved it!
The key part turned out to be defining the callback as static ! Even [Callback] does not seam to be necessary.

Signal.connect_object(..., ..., (GLib.Callback)..., this, ConnectFlags.AFTER) also works fine!
10x
MihailNaydenov

----- Original Message ----
From: gege2061 <gege2061 redaction-developpez com>
To: Mihail Naydenov <mlists ymail com>
Cc: vala <vala-list gnome org>
Sent: Tuesday, September 9, 2008 8:10:33 PM
Subject: Re: [Vala] connect_after

Hello,

For connect signal after, you must manage yourself the self instance :

Signal.connect_after (this.documents, "tab-removed", (Callback)populate_symbols, this);

/* ... */
[Callback]
private static void populate_symbols (Object sender, SymbolBrowser self)



2008/9/9 Mihail Naydenov <mlists ymail com>
Is there a way to connect a signal in connect_after mode?

I have tried the Signal.connect_after and Signal.connect_object(..., ConnectFlags.AFTER) , but at runtime there is failed assertion, from within the callback, that self is the expected type (the type of the class containing the callback)

10x
MihailNaydenov


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




--
Nicolas Joseph

Responsable de la rubrique GTK+ de developpez.com /
In charge of the GTK+ section on developpez.com

http://nicolasj.developpez.com



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