Re: intercept nervous button clicks...

Freddie Unpenstein:

How about clearing the button blocked flag from an idler, started once
the action is complete?


All I'd need to deal with your situation, would be to slip in
an idle timeout to call the restore function instead of calling the
restore function directly.  That's if it wasn't already solved by
insensitising the buttons and keeping the main loop running.

Let me sum up:

* In the beginning of each button click callback you call a function to
make the buttons insensitive (even the clicked one? protection is
needed here also),

* in the end of each button click event you start an idle function (by
the way do you start the same idle function for all buttons? if so, how
did you make sure to not start it twice?)

* the idle function make the buttons sensitive again after a delay

* the idle function is killed when the program exits

Did I get you right?

Thank You!

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