Re: [sigc] conditions in libsigc



Am Freitag, den 30.06.2006, 20:58 +0300 schrieb Paul Pogonyshev:
> Hi,
> 
> I would like to propose conditions in libsigc.  A condition is basically
> a boolean vairable plus signal which is emitted each time the variable
> state is changed (from true to false or vice versa.)

Sounds useful but I do not think they belong in sigc++. This sounds to
me like a special case of a variable that whenever changed emits a
signal. Why restrict yourself to bool?

>   They are useful in
> e.g. GUI design because you can specify a boolean expression, e.g.
> sensitivity or visibility, only once and not track when its state changes,
> which can be difficult at times.

Are there exception guarantees?

>   In other words, the condition itself
> and its state tracking are no longer separated and chances of programming
> error are significantly smaller.
> 
> I volunteer to implement this if you are interested.

I have written a library that does something similar but does NOT track
when the state changes. But this is nothing but syntactic sugar anyways.
You might want to take a look though:

http://gott.snip-a-lot.de/autodoc/namespacegott_1_1properties.html
(documentation only, includes a tutorial but not necessarily in the best
style)

> 
> Paul

Aristid

> _______________________________________________
> libsigc-list mailing list
> libsigc-list gnome org
> http://mail.gnome.org/mailman/listinfo/libsigc-list




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