Re: gtk_timeout_add



Perhaps I missed it, but I don't see where data ever got initialized (or passed in).  So I can see gtk_container_add might SEGV if data is not valid.

Ian Frawley wrote:

Right I have got it to compile with: GtkWidget * Alarmlist = gtk_list_new; gtk_timeout_add(10, GtkFunction ( GetAlarms ), Alarmlist);  void GetAlarms(GtkWidget * button, gpointer data){     GtkWidget * listitem = gtk_list_item_new_with_label ( "AAARRGG I AM ON FIRE" );    gtk_container_add ( GTK_CONTAINER ( data ), listitem );    gtk_widget_show ( listitem ); } but when it runs I get a sementation fault can anyone help ;-( Thanks Ian Frawley
Software Engineer
Opal Telecom
Tel: 0161 222 2122
E-Mail: ifrawley opaltelecom co uk

Attachment: kirk.waters.vcf
Description: Card for Kirk Waters



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