RE: Newbie question regarding gtk_signal_connet



Ok, I was advised to use structures to solve the problem which I almost
did except for a segmentation fault during the passing the structure to
gtk_singal_connect. Here is what I used

struct widget {
  GtkWidget *intput;
  GtkWidget *output;
};
void button_one_clicked(GtkWidget *button, struct widget
*widget_holder){
}
 gtk_signal_connect(GTK_OBJECT(button_one, "clicked",
GTK_SIGNAL_FUNC(button_one_clicked), widget_holder);

But the moment the function button_one_clicked is run it crashes, even
before it loads any variables (I've checked this by making the function
empty).

Is there something I did wrong? gcc didn't return any errors.

Nghia






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