Re: Problem sending data to gtk_button on "clicked" event



Evan Behar wrote:
I've been getting seg-faults when I try to work with data in my button
"clicked" callback functions, so as a test, I compiled and ran the
following program:

#include <gtk/gtk.h>

gchar m1[] = "button 1";
gchar m2[] = "button 2";

static void callback(GtkWidget* widget, GdkEvent *event, gpointer data) {
  g_print ("Hello again - %08X was pressed\n", data);
}

I'm not 100% sure, but I think this is not the proper callback for a
"clicked" event. I think the documentation has

static void callback(GtkWidget* widget, gpointer data);

as the prototype.

regards,
        Olivier




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