2

This problem is a continuation of what I started here. I'm using the asteroid example as a model to work from.

The problem I want to talk about here is the one of a timer. The asteroids example uses the event0 function to make one, which relies on the Graphics.UI.WX library. I don't want to use WX for this project. Could someone tell me what event0 is doing generally, so that I can figure out what I need to do to make a similar function?

Community
  • 1
  • 1

1 Answers1

0

To bind reactive-banana to an external event-based framework, be it WX or any other, have a look at the Reactive.Banana.Frameworks module.

The event0 function from reactive-banana-wx is just a thin wrapper over the fromAddHandler function from said module. The example code for reactive-banana demonstrates its use.

Heinrich Apfelmus
  • 11,034
  • 1
  • 39
  • 67
  • Thanks for responding, Heinrich. I have re-visited the slot machine example for instruction on how to use fromAddHandler. –  Sep 28 '12 at 20:53
  • Also at first glance, ActuatePause.hs looks instructive as well. –  Sep 28 '12 at 21:17