Re: call connected signal



> Hi,
>
> how could I force gtkmm to call a signal.

There is no general way, in gtkmm, to force a GTK+ signal to be emitted.
This is very rarely needed, and I'd like to see some GTK+ documentation
that says that you need to do it.

When it is necessary, some methods, such as
Gtk::TreeModel::rows_reordered() exist to not do much more than emit the
signal of the same name.

> I need this for redraw of a
> GUI part. I connected it this way:
>
>     target_combo.signal_changed().connect (sigc::mem_fun (*this,
>                                            &Application::on_target_combo_changed));
>
> If I call the on_target_combo_changed() function there're several
> warnings and the app crash.

You wrote on_target_combo_changed() so you should be able to find out why
it crashed. Calling it indirectly (by forcing the signal emission when the
signal would not normally be emitted) is unlikely to change that. I
recommend gdb and valgrind.

> I think there's a libsig call for this. But
> I couldn't find it.


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]