RE: (GObject) What are "properties"?



Install property is a way for g_object_set_xxx series functions. An implementation of OO with C.

-----Original Message-----
From: gtk-list-admin gnome org [mailto:gtk-list-admin gnome org] On Behalf Of dhaude physnet uni-hamburg de
Sent: 2003Äê11ÔÂ19ÈÕ 21:42
To: gtk-list gnome org
Subject: Re: (GObject) What are "properties"?


> Does your object "some_gtk_widget" have a property named "foo" that 
> takes a string value? If not, it is not surprising that the call 
> fails. It's a bit surprising that it crashes; I'd have expected a 
> warning.

Ah. No, of course it doesn't have that property, which explains why my experiment didn't work (and I re-checked; indeed I did get a warning, and the crash was a follow-up error caused by my program).

> Mathieu is doing a nice job on GObject documentaion. See 
> http://www.le-hacker.org/papers/gobject/index.html

I know; I read it (and also now understood that a property first must be "installed" before it can be used to assign values to it).

I guess I haven't quite wrapped my head around properties, but am I right in assuming that their main advantages (as opposed to, say, ordinary class members) are:

1) they are installable at runtime

2) they can emit signals when changed

Am I also right in assuming that each and every GObject carries around with it two hash tables; one for properties and one for the get/set_data() functions?

Thanks,
--Daniel

_______________________________________________
gtk-list mailing list
gtk-list gnome org http://mail.gnome.org/mailman/listinfo/gtk-list



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