From: Axel S. <A....@ke...> - 2006-11-12 00:45:43
|
On Nov 11, 2006, at 15:40, Pete Kazmier wrote: > On Nov 9, 2006, at 10:02 PM, Axel Simon wrote: > >> >> You are removing the time each time your IORef contains (Just ..). I >> suggest that you remove that line. Returning False is enough to >> remove this call back. What I think happens is that you return True, >> but remove the call back, so it doesn't occur again. > > Doh! That what happens when you stare at your code for too long. > Yes, it works now. If I return false from the callback function, do i > need to perform any cleanup, .i.e, such as removing the timeout? Or > does returning false from the callback take care of that? > Gtk does all that for you, i.e. it removes the signal, tells Haskell about it which then eventually garbage-collects the handler. So your code should be fine now. Axel. |