Re: GTK+ 1.1.12 - CList doesn't appear to work.




Michael Eddington <MichaelE@freerange.com> writes:

> Running Debian 2.0R4, 2.2-pre2 kernel, GTK+ 1.1.12.
> 
> trying to run the "clist" example program and I get this when I click the
> add button:
> 
> $ ./clist
> 
> Gtk-CRITICAL **: file gtkclist.c: line 2684 (gtk_clist_append): assertion
> `GTK_IS_CLIST (clist)' failed.
> Gtk-CRITICAL **: file gtkclist.c: line 2684 (gtk_clist_append): assertion
> `GTK_IS_CLIST (clist)' failed.
> Gtk-CRITICAL **: file gtkclist.c: line 2684 (gtk_clist_append): assertion
> `GTK_IS_CLIST (clist)' failed.
> Gtk-CRITICAL **: file gtkclist.c: line 2684 (gtk_clist_append): assertion
> `GTK_IS_CLIST (clist)' failed.
> 
> I get the same thing when trying to use it in my own code.  GTK+ 1.0.6 works
> fine.

The author of that code was apparently unsure as to whether they
wanted connect_object() or connect(). Since they are getting the
clist from the second argument of the callback, they wanted 
to simply use connect()

The following patch needs to be integrated into the tutorial/examples.

Regards,
                                        Owen


Index: clist.c
===================================================================
RCS file: /cvs/gnome/gtk+/examples/clist/clist.c,v
retrieving revision 1.3
diff -u -r1.3 clist.c
--- clist.c	1998/12/13 22:24:59	1.3
+++ clist.c	1999/01/14 05:27:58
@@ -73,15 +73,15 @@
     gtk_box_pack_start(GTK_BOX(hbox), button_hide_show, TRUE, TRUE, 0);
 
     /* Connect our callbacks to the three buttons */
-    gtk_signal_connect_object(GTK_OBJECT(button_add), "clicked",
-			      GTK_SIGNAL_FUNC(button_add_clicked),
-			      (gpointer) clist);
-    gtk_signal_connect_object(GTK_OBJECT(button_clear), "clicked",
-			      GTK_SIGNAL_FUNC(button_clear_clicked),
-			      (gpointer) clist);
-    gtk_signal_connect_object(GTK_OBJECT(button_hide_show), "clicked",
-			      GTK_SIGNAL_FUNC(button_hide_show_clicked),
-			      (gpointer) clist);
+    gtk_signal_connect(GTK_OBJECT(button_add), "clicked",
+		       GTK_SIGNAL_FUNC(button_add_clicked),
+		       (gpointer) clist);
+    gtk_signal_connect(GTK_OBJECT(button_clear), "clicked",
+		       GTK_SIGNAL_FUNC(button_clear_clicked),
+		       (gpointer) clist);
+    gtk_signal_connect(GTK_OBJECT(button_hide_show), "clicked",
+		       GTK_SIGNAL_FUNC(button_hide_show_clicked),
+		       (gpointer) clist);
 
     gtk_widget_show(button_add);
     gtk_widget_show(button_clear);



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