Re: How to avoid Signals ?



On 2/15/08, thom_schu gmx de <thom_schu gmx de> wrote:
> Hi there,
>  I have a GUI with checkboxes, comboboxes etc.
>  Depends on the state of a combobox, some checkboxes have be insensitive
>  or if a checkbox is active, a combobox has to be insensitive ......
>  So is it possible to change the state from inside my application like checkbox->set_active(false) without to trigger the signal to avoid
>  a "signal-loop" ?
>
>  thanks
>
>  gizmo

There's probably several different ways to do this.  Here's one:
sigc::connection conn = signal_foo().connect(...);
conn.block();
// do something that would normally emit a signal_foo
conn.unblock();
-- 
jonner


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