Re: Bizarre window behavior
- From: Havoc Pennington <hp redhat com>
- To: Jeff Shipman <shippy nmt edu>
- Cc: Sven Neumann <sven gimp org>, GTK List <gtk-list gnome org>
- Subject: Re: Bizarre window behavior
- Date: 14 Feb 2001 17:18:08 -0500
Jeff Shipman <shippy nmt edu> writes:
> > gtk_timeout_add (500, gtk_widget_hide, widget);
>
> Wow, that works great! Thanks a lot! One question, though. I
> do get a warning about using gtk_widget_hide because it is
> not a GtkFunctcion. How could I get rid of that warning?
Pass a function of the correct type:
gint
hide_timeout (gpointer data)
{
GtkWidget *widget = data;
gtk_widget_hide (widget);
return FALSE;
}
gtk_widget_hide() returns void, which means essentially a random
value, so could be called a bunch of times if you add it as a timeout
and the random junk in memory at the return location turns out to be
TRUE over and over.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]