Re: #50218 - Notification on write-only properties is questionable/problematic
- From: Owen Taylor <otaylor redhat com>
- To: Tim Janik <timj gtk org>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: #50218 - Notification on write-only properties is questionable/problematic
- Date: 28 Mar 2001 11:39:28 -0500
Tim Janik <timj gtk org> writes:
> On 26 Mar 2001, Owen Taylor wrote:
> > I think you were in agreement that notification on write-only properties
> > was a bad idea.
> > What was the concrete step to take here - something like the following
> > patch?
> > Regards,
> > Owen
> > - NotifyQueue *nqueue = object_freeze_notifies (object);
> > + NotifyQueue *nqueue;
> > +
> > + g_return_if_fail (pspec->flags & G_PARAM_READABLE != 0);
> > +
> > + nqueue = object_freeze_notifies (object);
> dude, you're cruel! ;)
> shouldn't we just silently ignore this?
Hmmm, if g_object_notify (SOME_WRITEONLY_PROPERTY) does nothing,
then its a bug to call it, and we should warn, right?
Otherwise, some poor programmer is going to be trying to figure out
why they aren't getting notified of the changes that they are
> also this would still queue changes for g_obejct_set(), so i'll add the
> check to object_queue_property():
OK, silently ignoring it there is needed, but it still seems to
me that we should warn when someone tries to do it explicitely.
] [Thread Prev