Re: [Vala] Vala Tutorial Issue



That is a typical warning for vala programs using closures. Looks like
correct.

In this code section of "The Main Loop" portion of the Vala tutorial.

void main() {    var loop = new MainLoop();    var time = new
TimeoutSource(2000);    time.set_callback(() => {
stdout.printf("Time!\n");        loop.quit();        return false;
});    time.attach(loop.get_context());    loop.run();}

I get this Error when trying to compile:

warning: passing argument 4 of 'g_source_set_callback' from incompatible
pointer type
/usr/include/glib-2.0/glib/gmain.h:199: note: expected 'GDestroyNotify' but
argument is of type 'void (*)(struct Block1Data *)'

Is the tutorial incorrect here?
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





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