Re: conditions
- From: Murray Cumming <murrayc murrayc com>
- To: paul linuxaudiosystems com
- Cc: gtkmm-list gnome org
- Subject: Re: conditions
- Date: Wed, 12 Jul 2006 21:58:57 +0200
On Tue, 2006-07-11 at 14:39 -0400, Paul Davis wrote:
> On Tue, 2006-07-11 at 19:41 +0300, Paul Pogonyshev wrote:
> > Hi,
> >
> > I'd like to propose the following extension to Gtkmm.
> >
> > Currently, all non-trivial programs do something like this many times:
> >
> > entry->signal_changed ().connect (sigc::mem_fun (*this, &Windows::update_sensitivity));
> > check_button->signal_toggled ().connect (sigc::mem_fun (*this, &Windows::update_sensitivity));
> >
> > // Set initial state.
> > update_sensitivity ();
> >
> > ...
> >
> > void
> > update_sensitivity ()
> > {
> > button->set_sensitive (entry->get_text_length () > 0 && check_button->get_active ());
> > }
> >
> > With conditions it can be simplified to
> >
> > button->set_sensitive (entry->get_not_empty_condition () & check_button->get_active_condition ());
>
> this is the fallacy in your argument.
That sounds almost not nice. Please always be nice.
> as was outlined very clearly by someone yesterday, you are basically
> trying to write a functional programming language. all it takes is for a
> more complex relationship between various conditional values and the
> widget sensitivity, and your proposal needs to be expanded dramatically
> in scope. how dramatic? well, it becomes an entirely new programming
> language.
As I said on the libsigc++ list, I think the idea is interesting and
could be useful sometimes if it can be done generically, and a separate
library is the way to show it can be done generically. I'm not willing
to make such a huge change to gtkmm itself for something that's not so
incredibly useful.
[snip]
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]