[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Problems with callback functions...
- From: Laurent Sauvebois <Laurent Sauvebois ns mecalog fr>
- To: gtk-app-devel-list redhat com
- Subject: Re: Problems with callback functions...
- Date: Fri, 25 Feb 2000 09:12:48 +0000
"Jeff W." wrote:
> How can I pass in my property box to this callback function so that I
> can call the gnome_property_box_changed() method and enable the "apply"
> button? Thanks for your time.
Hi,
two solutions for you :
1/
gint callback(my_type *my_pointer)
{
}
called by
gtk_signal_connect_object(GTK_OBJECT(my_widget),"event",
GTK_SIGNAL_FUNC(callback),GTK_OBJECT(my_pointer));
This way, the cast is done as the callback function is called. it is a cast
from a pointer to a pointer, no pb.
2/
gint callback(GtlWidget *my_widget, GdkEvent *my_event, my_type *my_pointer)
{
}
called by
gtk_signal_connect(GTK_OBJECT(my_widget),"event", GTK_SIGNAL_FUNC(callback),
(gpointer)my_pointer );
Last point : to my mind, your error is not due to the cast, as a cast from
pointer to pointer would not crash. To my mind, your pointer is set to NULL
for some other reason. Check this before ....
Laurent
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]