Hi Frederik,
Thanks a lot, it works perfectly.
regards,
Johan
Frederik wrote:
public class HelloVala: GLib.Object {
static void handler2 (FileMonitor monitor, File file, File?
other_file,
FileMonitorEvent event_type) {
// ...
}
public static int m
On Sat, Nov 07, 2009 at 14:47:16 +0100, Nicolas wrote:
> Signal.connect(monitor, "changed", (GLib.Callback)handler2, monitor);
No. That won't work without some magic applied to handler2, because the call
signature for signal handlers is different from regular methods. The normal
syntax:
objec
On Sat, Nov 07, 2009 at 13:16:02 +0100, Johan wrote:
> Hi Andrea,
> Thanks for the fast reply.
> I am still doing something wrong, I changed this:
>
> public virtual signal void handler2 (...)
No 'signal' keyword here. A handler is just a function. It must have
a signature that matches the signal
Hi Joan,
Try this:
Signal.connect(monitor, "changed", (GLib.Callback)handler2, monitor);
Nicolas.
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list
Hi Andrea,
Thanks for the fast reply.
I am still doing something wrong, I changed this:
public virtual signal void handler2 (...)
monitor.changed.connect((void) this.handler2);
and get the following:
macro "g_signal_connect" requires 4 arguments, but only 3 given
That is how the C-code looks l
Johan wrote:
> Hi,
> I wanna check if a file has been changed, and then take some action.
> However I am not getting the trick with the signal connection.
> the code below returns:
> (process:18773): GLib-GObject-WARNING **: IA__g_object_connect: invalid
> signal spec "changed"
>
> well I have che
Hi,
I wanna check if a file has been changed, and then take some action.
However I am not getting the trick with the signal connection.
the code below returns:
(process:18773): GLib-GObject-WARNING **: IA__g_object_connect: invalid
signal spec "changed"
well I have checked the specs of GLIB and