Re: property API vs fields



On Sun, 6 Aug 2006, Steph Fox wrote:

Hi GTK people,

The PHP-GTK doc team have hit a point of confusion over the property API in
GTK 2, mostly because publicly accessible fields hanging over from GTK 1 are
still publicly accessible. We don't know whether to promote the use of
*_get_|set_property() or not, and to some extent that depends on whether it
will eventually be enforced by the GTK+ team.

can you be more specific and actually point out real fields/properties?

In PHP, the approach makes a difference to syntax; directly accessible field
names can't contain a hyphen, but a string parameter 'property' passed to a
get|set function can. Since some widget properties share the name of a field
in the same widget, I can see all kinds of confusion in store.

property names can only consist of [a-zA-Z0-9-], enforced by
glib/gobject/gparam.c:canonicalize_key(), so property name strings
maps perfectly well on to regular identifier names (with just s/-/_/).

Short version: Is there a plan to phase out publicly accessible fields in
GTK widgets, or are you intending to retain them for all time as a BC
consideration?

again, can you be bothered to point out particular fields?
if you point out concrete cases, you might get concrete answers ;)

Sorry if this is covered in the list archives somewhere, your search
facilities are having a bad day (and MARC's don't work for function names).

- Steph

---
ciaoTJ



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