Re: construct-time properties and constructor
- From: murrayc t-online de (Murray Cumming)
- To: Tim Janik <timj gtk org>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: construct-time properties and constructor
- Date: 14 Nov 2001 01:44:33 +0100
On Wed, 2001-11-14 at 00:39, Tim Janik wrote:
> > So how can I get at that information? Should I use struct member fields which are set in set_property(), then read in those temporary values in the constructor after calling the base constructor?
>
> hm, adding newlines helps making the message text more digestible.
evolution.
> if with struct member fields you mean object fields, then yes.
Yes, I mean a constructor like this:
static GObject*
gnome_appbar_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_params)
{
GObject *object = 0;
GnomeAppBar *appbar = 0;
/* Call base class's constructor: */
/* This will set the temp_* values in set_property() */
object = (* G_OBJECT_CLASS (parent_class)->constructor) (type,
appbar = GNOME_APPBAR(object);
_gnome_appbar_construct (appbar,
appbar->temp_has_progress,
appbar->temp_has_status,
appbar->temp_interactivity);
}
I guess we have to break the API on libgnomeui so that we have somewhere to temporarily
store these construction parameters.
>
> CONSTRUCT properties are set and gotten just like normal properties through
> set_property()/get_property(). they are just ensured to be set (only, depending
> on the flags) at construction time. providing you access to the object constructor
> just means you can shuffle stuff in your object _right after_ they were
> set.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]