using gtk_timeout_add witj a gtklist



Hello


I am trying to make an application in which a Clist is
Updated every 30 secs.

so I use gtk_timeout_add to call a function which
updates my list.

my timeout looks like this

gint tout;
GtkWidget *list;

list = lookup_widget(appWindow,"List");
tout=gtk_timeout_add(3000,(GtkFunction)Create_List(list),NULL);


gint Create_List(GtkWidget *list)
{
     gint row;
     gchar *values[] = { "dgdg","jddj","hdhd"};
      //check for conditions and clear list
     gtk_clist_clear(list);
     row=gtk_clist_append(GTK_CLIST(list),values);
     return (TRUE); 
}

It Creates it once and then gives me a segmentation
fault.
Is there something obvious I am missing out here ?
If I run the function in a loop it runs perfectly
fine.

any comments are welcome.


Thanks

Rajeev

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com



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