Re: How do I pass a widget pointer to a function/callback?
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Jay Barnes <jaybarnes yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How do I pass a widget pointer to a function/callback?
- Date: Wed, 28 Jan 2004 16:16:35 -0500
Jay Barnes wrote:
g_signal_connect (G_OBJECT (button), "enter",
G_CALLBACK (enter_button), (gpointer) box);
If `box' is a ptr-to-widget at this point, then this is good so far...
static void enter_ramen( GtkWidget *widget, gpointer box )
{
gtk_widget_hide(box);
}
I suppose this is what you would want `enter_button' to do ?
Is it possible that either 'box' is a wild pointer or that your
compiler is not complaining due to a prior declaration of somthing
like:
static gboolean enter_button = FALSE;
Other than some technical mistake; I dont see anything
fundimentaly wrong with your reasoning.
HTH,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]