[gtkmm] handling signals within a signal handler?



Hello Everybody,

I am really starting to enjoy programming with Gtkmm-2.2!  I have a few more 
questions that might be good candidate for the FAQ:

(1) I have a Gtkmm application that waits for the user to press a button 
labeled "GO" and then in the signal handler, I have something like the 
following:

void on_go_button_clicked() {
  for (int i=0;i<500;i++)
    // do something CPU intensive here
}

The problem is this function takes about 3-5 minutes to complete, and during 
that time, the GUI is completely unresponsive, and it appears to the user that 
the application has crashed.  Ideally, I would like to run maybe 1-5 iterations 
and then check for GUI button presses (such as a STOP button that would break 
out of the loop).  Can this be done w/o using multiple threads??


(2) How do you get rid of that damn console window when you start your 
application by double clicking it (from Windows 2000)??

I appreciate the feedback I got on my previous posts!

Thanks in advance,

Gene Ruebsamen
Downey Savings, Inc.

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



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