Re: [gtk-list] inheritance for instance-initializers?




On Mon, 9 Aug 1999, Peter Lerner wrote:
> 
> does the instance-initializer for any gtk-object
> (implicitly?) call its parent-instance-initializer?
> 
> does e.g. gtk_widget_init() trigger a call to 
> gtk_object_init() in any way?
> 
> does the whole mechanism work like the 
> class-initializers?
> 

gtk_widget_init() doesn't trigger gtk_object_init(), but
gtk_type_new(GTK_WIDGET_TYPE) will run both of them. So yes it ends up
working in the same way as C++ constructors, as in:

 Widget::Widget() 
  : Object()
 {

 }

You might be interested in my sample chapters at
http://pobox.com/~hp/gnome-app-devel.html which describe the object system
in some detail.

Havoc




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