On Tue, 2008-10-14 at 12:44 -0400, Tristan Van Berkom wrote: > On Tue, Oct 14, 2008 at 4:08 AM, Maciej Piechotka <uzytkownik2 gmail com> wrote: > > For some reason I have to 'extend' the property. I.e. the parent had > > G_READABLE and the child has to have G_READABLE | G_CONSTRUCT_ONLY. > > > > Is such construction correct: > > > > GParamSpec *spec; > > > > g_object_class_override_property (gobject_class, PROP_FOO, "foo"); > > spec = g_object_class_find_property (gobject_class, "foo"); > > spec->flags |= G_PARAM_CONSTRUCT; > > > > Is (for GParamSpecObject) this correct: > > spec->value_type = BAR_TYPE_CHILD > > > > Assuming BarChild is child of the original class? > > > > According to the docs your code is safe, although I've > always used g_object_class_install_property() directly > in a subclass if I needed to change the default or flags... > so I would say that is also safe. > > Cheers, > -Tristan Ok. I didn't know I can use gocip directly. Regards
Attachment:
signature.asc
Description: This is a digitally signed message part