RE: (GObject) What are "properties"?



> 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

These are true, though I don't think 1) is that useful. More importantly,
they
3) are introspectable, so a RAD tool (such as Glade) can find out what
properties an object has, without special code for each widget.
4) don't mess with ABI. You can add a property without worrying about
changing the size of the struct. The new private instance data thing in glib
2.3 also does this, howeer.

Murray Cumming
www.murrayc.com
murrayc usa net



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