Re: Confused Signals?



Trey Tabner wrote:

I have code that works perfectly on Linux/x86 and other Operating
systems, with x86 processors.  We've ported it to Solaris/sparc 2.5.1,
but we're now getting consistent and reproducable segfaults.  We have
the function prototype of:

function (GtkWidget *placeholder, GtkTree *tree, char *text, int type);

and in this function, a GTK_ENTRY is connected to the same function with
the "activate" signal.

The callback for the "activate" signal on a GtkEntry is

  void user_function(GtkEditable *editable, gpointer user_data);

so you have no control over what values get assigned to the remaining two
arguments.

If you really need to pass those extra arguments to your callback, you should
create a struct and pass a pointer to that, instead.


-Josh




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