Re: Default values for properties
- From: Havoc Pennington <hp redhat com>
- To: Martin Baulig <martin home-of-linux org>
- Cc: gtk-devel-list gnome org, timj gtk org
- Subject: Re: Default values for properties
- Date: 05 Mar 2001 14:44:04 -0500
Martin Baulig <martin home-of-linux org> writes:
> While doing some debugging, I realized that on object creation the
> `set_property()' method is called for all properties and not only for the
> ones that were given to g_object_new().
By "all properties" I hope you mean "all construct properties" or we
have a serious efficiency issue. ;-)
> This means that my `set_property()' handler can't figure out whether the
> user explicitly set a property or whether it's just the default value of it.
> What do you think about adding a G_PARAM_NODEFAULT flag to request that a
> property won't get its default value if it isn't explicitly set ?
Why are construct properties different from regular properties in this
respect? i.e. why are we setting them to their default value at all?
Normal properties have their defaults filled in _init(), construct
properties could work the same way.
] [Thread Prev