On Tue, 2006-01-03 at 10:10 +0000, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
That's not related to the mixins, but simply to the fact that if you declare something as returning "GTK.Widget", you'll get a GTK.Widget. One solution would be to extend the syntax to allow i.e. "GTK.Widget+" as a return type, meaning that subclasses may be returned as well. Or we could simply use push_gobject() always, I don't know if there are any compelling performance reasons to ever use push_gobjectclass(), and risk this type of problem...
I think extending to GTK2.Widget+ would be better. Some classes don't work with push_gobject, such as GTK2.TextIter. Those have to use push_gobjectclass(), because either push_gobject() gets it wrong, or I believe because GtkTextIter is not a gtk object, but a structure that I implemented as an object, so it doesn't get identified in pgtk_type_to_program().