Re: time: continuation
- From: Gus Koppel <gtk spamkiller bytechase cx>
- To: gtk-app-devel-list gnome org
- Subject: Re: time: continuation
- Date: Tue, 20 Jan 2004 13:23:00 +0100
christophe Meyer <chr meyer nerim net> wrote:
Thanks for your answers :)
I've written a short example but it doesn't work.
I used glade to build my interface and i've put this pieceof code in
my main.c file:
gchar *buff;
gint count=0;
GtkWidget *statusbar;
statusbar = lookup_widget (window1, "statusbar1");
void afficher_h()
{
buff = g_strdup_printf (" My counter: %d", count++);
gtk_statusbar_push (GTK_STATUSBAR (statusbar), 1, buff);
}
g_timeout_add(1000, afficher_h, NULL);
What's wrong with that ?
Have a closer look at the definition and description of g_timeout_add
() again. Your afficher_h () function must not be of type "void"!
http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#g-timeout-add
http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#GSourceFunc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]