On 18 Jul 2009, at 10:14, andrei_c wrote: > I have only one question now: since you don't really need > remove_timeout() and you can just stop calling repeat_timeout() > when the time is right, what good is remove_timeout() for?? Is it a > last case resort, so you can force to stop the timeout or what for???
There are lots of uses - here's one example: Suppose you show a pop-up warning message, then you might start a timer to automatically dismiss that message after 20 seconds if the user has not dismissed it themselves, and to maybe trigger some other "emergency" action (because you are assuming the user has not seen the warning...) But if the user does hit the close button for the dialog before that 20s is up, then you might want to call remove_timeout to prevent that from happening, since the user clearly *has* seen the message in that case. And I'm sure, once you get into it, you'll see lots of places where removing a still-running timer makes good sense. Removing an expired timer is not all that useful though, generally, which is what would probably be happening in your code now, I guess. -- Ian _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

