Re: Overriding property defaults



On 27 Mar 2001, Owen Taylor wrote:

> 
> Hey Tim,
> 
> Did you have any thoughts on this? 

yes, for a long time actually.

>  - Whether we should be worrying about this problem

yes we definitely need to.

>  - Whether the approach is good

not too bad, but it's not all we need.

> I'm going through the open GObject bugs, and trying to decide
> whether to punt this one (#51748) from the 2.0 milestone.

no, we can't, it should be taken care of by the per-class
property list function, and that's definitely required.

> The minimum to be able to do this without breaking source
> compatibility is adding _copy and _set_default functions to
> GParamSpecTypeInfo.

adding _set_default functions isn't sufficient, what if ranges
change in a child class, or G_PARAM_CONSTRUCT_ONLY suddnely
becomes a normal read/write property.
what if a child doesn't want to inherit a certain parent class
property because it takes care of its value internally?

so basically children need to be able to override parent properties
full scale, but that's best done with the g_param_spec_*() functions,
just the property lister needs to mask them out.

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]