Re: Connecting idle-signal aborts my program
- From: Jonathon Jongsma <jonathon jongsma gmail com>
- To: Daniel Kraft <d daniel-kraft net>
- Cc: gtkmm-list gnome org
- Subject: Re: Connecting idle-signal aborts my program
- Date: Tue, 27 Dec 2005 20:19:30 -0600
What kind of error do you get? It compiles and runs just fine for me
(using both 2.8.0 and CVS gtkmm)
On 12/27/05, Daniel Kraft <d daniel-kraft net> wrote:
> 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
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]