Re: [gtk-list] callback error
- From: Havoc Pennington <hp Mcs Net>
- To: gtk-list <gtk-list redhat com>
- Subject: Re: [gtk-list] callback error
- Date: Fri, 19 Feb 1999 17:56:55 -0600 (CST)
On Fri, 19 Feb 1999, Omar Armas Aleman wrote:
>
> I'm not getting the correct argument of a callback func.
> In 'do_search' I'm not getting the 'list' variable correctly.
>
If this was a Gtk bug, every Gtk and Gnome app would be broken in an
obvious way. So it's 95% likely there is something wrong with your code.
However, you haven't posted enough code for us to tell what that is (at
least, I don't see it, perhaps someone else will).
> static void
> do_search(GtkWidget *widget, GtkWidget *list)
> {
> //i also tried do_search(GtkWidget *list)
> ...
> }
How do you know whether list is valid or not in this function? (i.e., when
you say list isn't passed properly, how do you know that?)
>
> foo()
> {
> GtkWidget *list;
> ...
>
> gtk_signal_connect (GTK_OBJECT (button), "clicked",
> GTK_SIGNAL_FUNC (do_search), list);
>
> //do_search(button, list) works, but the above callback don't
> }
>
Perhaps you accidentally destroy 'list' at some point? Perhaps the
pointer is invalid when you call gtk_signal_connect?
The part you've posted looks fine, perhaps post a larger code segment.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]