Connecting idle-signal aborts my program
- From: "Daniel Kraft" <d daniel-kraft net>
- To: <gtkmm-list gnome org>
- Subject: Connecting idle-signal aborts my program
- Date: Tue, 27 Dec 2005 17:58:18 +0100
Hi!
I want to use the Glib::signal_idle() signal in my program, but when I try to
connect my slot (a sigc::ptr_fun) to it, the program is aborted. The stack dump
contains no stackframes at all.
The minimal program which produces the error is very simple:
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <iostream>
using namespace std;
bool idle()
{
cerr << "Idle!" << endl;
return true;
}
int main(int argc, char** argv)
{
Gtk::Main kit(argc, argv);
Gtk::Window w;
Glib::signal_idle().connect(sigc::ptr_fun(&idle));
kit.run(w);
return 0;
}
What is my problem? Can I connect to that signal only in special situations,
e.g. when a component is realized or in a component's constructor?
Thank you very much!
Yours,
Daniel Kraft
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]