Re: Signal handler not called
- From: Luca Cappa <luca cappa i-medlab com>
- To: gtkmm-list gnome org
- Subject: Re: Signal handler not called
- Date: Mon, 31 Jan 2005 11:06:24 +0100
Luca Cappa wrote:
Hello,
I created a custom widget which extends the Gtk::Frame class. I add to
it a HBox and inside this box a gtkglextmm widget (which extends from
Gtk::DrawingArea and public Gtk::GL::Widget<View2D>), and a
Gtk::HScale. In the constructor of the Gtk::Frame custom class i put:
mScale.set_digits (0);
mScale.set_draw_value (true);
crap = mScale.signal_value_changed ().connect (
sigc::mem_fun (*this, &klSliceViewer::sliderChangedEvent));
std::cout << (crap.connected () ? "connected" : "unconnected") <<
std::endl;
std::cout << (crap.empty () ? "empty" : "not empty") << std::endl;
Gtk::Adjustment lAdj (0, 0, 255, 1, 1, 0);
mScale.set_adjustment (lAdj);
Here there was the problem. Indeed the Gtk::Adjustment would be
destroyed just after the constructor og my widget exits. Now the Adj
object is a class member and no more a localvariable, and it works like
a charm :)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]