Re: [Java-gnome-developer] parent missing from GtkWidget
Brought to you by:
afcowie
From: Julian F. <jul...@be...> - 2001-03-27 02:36:44
|
But what I can't quite figure out is why the java objects are created as= GtkWidgets instead of being just returned as GtkWidgets. For example, even something like parents() which should return a= GtkContainer should actually create a GtkList but then return it as a= GtkContainer. My patch to GtkContainer::children() included code that got= the Gtk type, generated the java path for it, and created an object of= that type. But unfortunately I don't understand the code base as a whole= well enough to figure out where and if this could be used. I did try= adding the code to GtkWidget::parents() but it seemed to cause other= problems there and I gave up. But I can't see any fundamental reason why it wouldn't work. I've run into= 3 or 4 cases already where an object is not being created as the= appropriate subclass and I've had to modify the generated code to fix it.= Obviously I'd like to fix the fundamental problem instead. On the other= hand the project I'm using it in is almost done so maybe Gtk 2.0 will be= stable by the time I need it again. Julian On 26/03/01 at 11:24 AM Dan Bornstein wrote: >Julian Fitzell writes: >>Also, is there some reason why so many methods return GtkWidgets instead >of >>what the C versions return? > >There's a reason, but not a particularly good one. The bulk of the .defs >files comes from the gtk distribution, and *they* weren't particularly >consistent. Java-Gnome inherited that inconsistency. > >The good news is that with gtk-2.0, a lot of the language binding issues= go >away and the whole thing can become a lot cleaner. The bad news is I have >no idea when 2.0 will be stable enough to develop against. > >-dan > >_______________________________________________ >java-gnome-developer mailing list >jav...@li... >http://lists.sourceforge.net/lists/listinfo/java-gnome-developer |