Re: invalid unclassed pointer?
- From: Vlad Harchev <hvv hippo ru>
- To: "Dugas, Alan" <alan dugas analog com>
- Cc: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: Re: invalid unclassed pointer?
- Date: Wed, 23 Aug 2000 20:18:11 +0500 (SAMST)
On Wed, 23 Aug 2000, Dugas, Alan wrote:
> I've written a function that creates a window with a combo box and a drawing
> area. The drawing area is connected to the "configure" and "expose" events and
> passes the GTK_WIDGET(combo) to the function called. However, when the progam
> reaches the callback function, I keep getting the following message just prior
> to segfaulting;
>
> Gtk-WARNING **: invalid unclassed pointer in cast to 'GtkCombo'.
>
> The callback function is declared as:
> void draw_histogram(GtkWidget *calling_widget, GtkWidget *widget)
It should be:
gboolean draw_histogram (GtkWidget *widget,
GdkEventExpose *event,
gpointer user_data);
i.e. it should accept 3 params instead of two.
> The signal connections, which occur after the combo widget is created, realized,
> and shown, are as follows:
> gtk_signal_connect(GTK_OBJECT(drawing_area), "configure_event",
> GTK_SIGNAL_FUNC(draw_histogram), GTK_WIDGET(combo));
> gtk_signal_connect(GTK_OBJECT(drawing_area), "expose_event",
> GTK_SIGNAL_FUNC(draw_histogram), GTK_WIDGET(combo));
>
> The line of code triggering the warning, and subsequent segfault, is:
> combo = GTK_WIDGET(combo);
> WHere combo is declared as follows:
> GtkWidget *combo;
>
> I've tried to realize the GtkCombo widget to no avail and everything else looks
> proper. What is warning trying to tell me? Is this some sort of weird scope
> issue? Any and all responses would be appreciated!
>
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]