Re: "changed" and GtkEntry set_text
- From: Christian Robottom Reis <kiko async com br>
- To: Soeren Sandmann <sandmann daimi au dk>
- Cc: gtk-devel-list gnome org
- Subject: Re: "changed" and GtkEntry set_text
- Date: Sun, 20 Jun 2004 12:10:40 -0300
On Sun, Jun 20, 2004 at 05:04:10PM +0200, Soeren Sandmann wrote:
> Christian Robottom Reis <kiko async com br> writes:
>
> > In 1.2 two "changed" events were emitted. Owen has said that
> >
> > In general, "changed" signals should be thought of as
> > "something might have changed" rather than as "something
> > changed".
> >
> > However I'm unsure how to interpret that in this specific case. Should I
> > rely on this staying this way, or was it an `accidental' change?
>
> It's a deliberate change. In general, gtk+ tries not to emit change
> notifications when nothing actually changes. What Owen said should be
> interpreted as "there is no *guarantee* that something actually
> changed", ie. you _might_ get a changed signal even if nothing
> changed.
The consequence is that you can no longer rely on set_text() emitting a
changed signal, as it used to in "the old days". This allowed one to use
"changed" to reliably implement an observer pattern with an
interchangeable external data model; it now requires a hack to ensure
it's emitted in this specific case. Are there reasonable alternatives?
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]