Re: (no subject)



On Tue, 13 Jun 2000, M.N.S.S.K.Pavan Kumar wrote:

..snip..
> Gtk-WARNING **: The `GtkPie' class is smaller than its parent class
> `GtkWidget'
> Segmentation fault (core dumped)
..snip..
> How is it possible that sizeof(GtkPieClass) is smaller than its parent
> class.

You've only allocated a pointer to a GtkWidgetClass, which is much smaller than
the whole widget class itself.
The parent class should be statically allocated, so your class should look like
this:

  	struct _GtkPieClass {
 		GtkWidgetClass parent_class;
 	};

Subtle but important difference.

hth,

-- 
Lee Mallabone.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]