Object properties.
- From: Tristan Van Berkom <vantr touchtunes com>
- To: gtk-app-devel-list gnome org
- Subject: Object properties.
- Date: Mon, 30 Aug 2004 15:27:37 -0400
Hi all,
I've just been going over the properties API as I've never
really implemented that before and I'm sure I'm missing something.
Here is my conundrum:
o All objects seem to override the G_OBJECT_CLASS(class)->set/get_property
method.
o No objects seem to chain this method up to the parent class.
So effectivly, this kind of code doesn't work:
/* Instantiate GTK_WINDOW with some properties */
GtkWindow *window =
(GtkWindow *)g_object_new(GTK_TYPE_WINDOW,
"window-position", GTK_WIN_POS_CENTER,
NULL);
/* Set window size */
g_object_set(G_OBJECT(window),
"width-request", 800,
"height-request", 600,
NULL);
Or does it ? Is there some mechanism that is delagating the property
accesses to the appropriate get/set_property() methods ?
Hmmm, I think I just answered my question, but if anyone is certain
about this, I'd like to hear your input.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]