I am trying to get some experience with reactive-banana, accord to its website, it should support GTK. I was wondering if there is any tutorial/introductory material on how to do that?
I read here in SO that there is a jaek project, but I am more looking for a minimal example for using reactive-banana with gtk2hs (gtk3 from hackage), as I have no prior experience with FRP or reactive-banana.
Also, I tried many many times to get reactive-banana-wx work on Windows/MinGW. Even though I was able to eventually get wxHaskell to install, there were run-time errors up-front (https://stackoverflow.com/questions/23367950/wxc-segfault-in-wxhaskell). I guess I couldn't get wxHaskell to work properly unless I downgrade everything to 2010 or earlier, as there have been no instructions after that on how to make wxHaskell work on Windows, only questions.
I tried installing Gtk2Hs today. Even with gtk3, it was a breeze. That makes me wonder if there is good material for beginners on this route (i.e. reactive-banana + gtk2Hs).
Thanks,
Jaek.UI.FrpHandlers
, see how GTK events are wired in in functions likeclickEvents'
, and then follow on toJaek.UI.FrpTypes
, where you can find glue code usingnewAddHandler
andfromAddHandler
(e.g. inevent1
). It uses a rather old version of reactive-banana, but the key things still hold. – AnnikaannikeneClickOK :: Reactive.Banana.Event t ()
you can wire it into your event network without caring whether it came from GTK or wx or Threepenny and so forth. So it can be done as long as the glue code is kept into a separate, self-contained module. – Annikaanniken