RE: [gtkmm] PropertyProxies vs get/set?



> I'm curious as to the reasoning behind this. I can understand 
> having accessors for those who prefer them - matter of taste 
> - but it seems these are the official GTKmm way and the 
> ability to treat properties syntax-wise as variables isn't 
> used. Why not?

I would remove the property proxies, but they have one extra feature - they
have a signal so you can monitor changes. Maybe sometime in the future we
will think of a simpler type-safe way to offer this notification signal.

The get and set methods can be thought of as convenience syntax (as they are
in GTK+), but I do think that it is convenient, because the average C++
developer is very familiar with them.

button.property_something() == 2;
is strange and unusual to a lot of people, even if it's obvious to us.

Feel free to document them - our tools/extra_defs_gen programs should be
able to extract the properties documentation for reuse by gmmproc. That
should not be difficult to implement.

Murray Cumming
www.murrayc.com
murrayc usa net



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