Re: [sigc] conditions in libsigc



Murray Cumming wrote:
> On Sat, 2006-07-08 at 17:40 +0300, Paul Pogonyshev wrote:
> > I posted an implementation here and repost it.  Note that conditions and
> > sensivity statement in the example is not so nice, because there is no
> > (yet) support on the part of Gtkmm.  It looks like this:
> > 
> >     controller = new SensivityController (button,
> > 					  (condition (new EntryNotEmptyCondition (entry))
> > 					   & condition (new ToggleButtonActiveCondition (check_button))));
> > 
> > Otherwise, the example is fully working, though not optimized etc.  In
> > particular, all three steps are encapsulated with creating conditions
> > and nothing else.
> > 
> > I want to note that it doesn't require much from sigc++.  It is a small
> > new module, probably some 1000 lines in one file.  And it doesn't
> > influence the existing functionality in any way.
> 
> So, the controllers must be specialized for what they control. 

Yes.  Or they can be replaced with a set of functions like
`Gtk::Widget::set_sensitivity (sigc::condition)'.  I actually like this
way more, but of course couldn't implement it in an example.

> I suggest that you try to distribute this in a separate library for now.
> I'm not sure that people will consider it worthwhile to introduce the
> extra concept into their code, but let's see if they like it.

It's pointless.  I will never convince Gtkmm people to use another library
and conditions only make sense when they are built-in in the GUI classes.
The only alternative I can see is to build low-level functionality in
Glibmm instead of sigc, but sigc is a more logical place since conditions
only depend on signals presence.

Is your decision final?

Paul



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