[Haskell-beginners] GTK + Reactive
levi.stephen at gmail.com
Mon Nov 24 07:00:35 EST 2008
I'm trying to set up a simple program combining Reactive and GTK. I have the
program below so far, but mainQuit is never called. After looking at a
couple of adapters I tried adding the commented out line, but this didn't
work for me.
I'm sure I've probably missed something, but I'm not sure what.
main = do
clock <- makeClock
(windowDestroy, sink) <- makeEvent clock
w <- windowNew
w `onDestroy` sink ()
-- forkE (tSync clock) $ quitOnDestroy windowDestroy
quitOnDestroy :: Event () -> Event (IO ())
quitOnDestroy e = fmap (const mainQuit) e
tSync :: Clock TimeT-> ITime -> IO ()
tSync clock t = sleepPast (cGetTime clock) (exact t)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners