Re: [Java-gnome-developer] parent missing from GtkWidget
Brought to you by:
afcowie
From: Julian F. <jul...@be...> - 2001-03-24 08:21:39
|
Argh... forget this one... I originally had (GtkWidget parent) but then had= to change it in code to use GtkContainer. I then changed the defs file to= use GtkContainer but didn't try it before submitting the patch.. of course= I find it won't build because GtkContainer isn't defined yet at this= point... Of course, this doesn't solve the problem that it doesn't work without= being a GtkContainer... in fact, it really needs to return a GtkContainer= but create an object that is actually of the correct subclass of= GtkContainer. Shouldn't this always be the case? Shouldn't all the= methods create objects of the appropriate type and just return them as a= superclass where necessary? Julian On 23/03/01 at 11:49 PM Julian Fitzell wrote: >the parent property of GtkWidget seems to be missing from the .defs >file... >any reason for this? > >Also, is there some reason why so many methods return GtkWidgets instead= of >what the C versions return? > >Julian > >A patch should it be necessary: > > >Index: src/defs/gtk.defs >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >RCS file: /cvsroot/java-gnome/java-gnome/src/defs/gtk.defs,v >retrieving revision 1.22 >diff -u -r1.22 gtk.defs >--- src/defs/gtk.defs 2001/03/01 17:31:53 1.22 >+++ src/defs/gtk.defs 2001/03/24 07:36:57 >@@ -742,7 +742,8 @@ > > (define-object GtkWidget (GtkObject) > (fields >- (GdkWindow window))) >+ (GdkWindow window) >+ (GtkContainer parent))) > > (define-func gtk_widget_get_type > GtkType > > >_______________________________________________ >java-gnome-developer mailing list >jav...@li... >http://lists.sourceforge.net/lists/listinfo/java-gnome-developer |