Re: [java-gnome-hackers] GtkCellRendererCombo - help appreciated
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2008-05-14 05:49:12
|
On Tue, 2008-05-13 at 23:35 +0200, Stefan Prelle wrote: > setPropertyObject("model", model) > unable to set property 'model' of type 'GtkTreeModel' from value of > type 'GObject' Ah. That would seem to be a bug. It _might_ be the same class of problem that we recently ran into with GValues holding enums: for some reason GValue gets grumpy when asked to hold abstract types. See 'textview' revno 508. Actually, the real bug is that we didn't have any test coverage of setPropertyObject(); at least we had somethine for getPropertyObject(). Which raises a different question: why does the get path work and not the set path? The GValues are being initialized the same way, aren't they? Answer, no, not quite: the GValues in property getting are created C side in our GObject.g_object_get_property() implementation using the GParamSpec. So we'll either have to do the enum hack again, or change the way GObject.setProperty() works so that it creates the GValue C side. What a pain. I hate GValues. In fact, I'd be happy if they went away entirely. That would mean making GObject.setProperty(), GtkTreeView.setValue() and anything else that uses GValue have a native overload for every type combination [in a hand written Override]. That *is* doable, but at present we have all those code paths concentrated through the Value code paths. Well, whatever. Something for the future. AfC Sydney |