Callback data Corruption



Hi,

The problem I've got is that I'm writing a plugin for GNU Denemo which acts
on the internal datastructures.  The initialisation process adds menu items
to perform the operations.  (It's written in C but compiled using G++ as we
are looking at porting it to C++.)

The pointer to the datastructures gets corrupted when passed to the menu
callback function.  However, in the initialisation it is fine.

Here's one of the menu connects:

gtk_signal_connect(GTK_OBJECT(menu_item3), "activate",
                    GTK_SIGNAL_FUNC(unhighlight),
                    (struct scoreinfo *)si);

and the signal callbacks

void highlight(gpointer callback_data,
               GtkWidget *widget);

Should I be using the "select" signal instead of  "activate"?? Or is it
something else.

Adam



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