Re: [Bug 40218] New - Notification on write-only properties is questionable/problematic



(havoc submitted this to bugzilla)

On Wed, 20 Dec 2000 bugzilla-daemon widget gnome org wrote:

> + Summary: Notification on write-only properties is questionable/problematic
> + 
> + If you get the "notify" signal for a write-only property, it's kind of
> + unclear what you are supposed to do about it; you can't get the value of
> + the property. How do you handle this in a GUI builder?
> + 
> + As a concrete example, for GtkTextTag there's a write-only "foreground"
> + property that is the color name as a string. You can also set the color as
> + a GdkColor. In a GUI builder, conceivably you want people to be able to
> + enter the color as a string, but you can't really do that since
> + you can't display the current color as a string.
> + 
> + Anyway, I'm thinking perhaps notification should be disabled for write-only
> + properties, since it only conveys that the property was touched, there's no
> + way to get the new value or display the value.
> + 
> + In my experience write-only properties are only used for a different way to
> + set some readable property. So there is always some other property that
> + should be used for notification in these cases.

havoc,

i've been thinking about that as well, e.g. there's currently also
notification emitted for the "signal::" and friends properties.
i agree that it doesn't make a whole lot of sense here to have
notification, but i'm not sure !READABLE is the only valid criteria.
i think a better idea is probably to introduce an extra property flag
G_PARAM_NONOTIFY (or, since negations in symbols sound quite odd,
G_PARAM_SILENT) that users can specify when introducing properties.
for !READABLE properties, this flag would automatically be set, since
as you outlined, notification is of doubtfull use for them.

---
ciaoTJ





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