Re: [Haskell-cafe] Simple GUI Form
I created that for a specific application I was writing, where I was saving the data directly to disk. I modularized as an afterthought. But I don't see anything wrong with using types that have JS in their names. It is STILL a haskell data structure. Just one which can be converted to a relatively universally parse-able String easily when needed ;) It's fine if you don't use gtk. I just wanted to show off my code :) Timothy -- Původní zpráva -- Od: Rune Harder Bak r...@bak.dk Datum: 30. 11. 2012 Předmět: Re: [Haskell-cafe] Simple GUI Form I know it's not wx, but if you were willing to use GTK, you could simply install: http://hackage.haskell.org/package/gtk-jsinput (http://hackage.haskell.org/package/gtk-jsinput) and generate the form automatically as described in: https://github.com/timthelion/gtk-jsinput/blob/master/Graphics/UI/Gtk/ Custom/JSInput.hs (https://github.com/timthelion/gtk-jsinput/blob/master/Graphics/UI/Gtk/Custom/JSInput.hs) Cool! Would rather see it generated from the haskell data structure than from json, but you could of cause generate json from the data type. My understand is that GTK applications don't look and feel native on windows/mac, that's why I went for wx, but I could easily be wrong.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
Sure, and thanks for sharing. We need more declarative GUI building! On Sat, Dec 1, 2012 at 9:00 AM, timothyho...@seznam.cz wrote: I created that for a specific application I was writing, where I was saving the data directly to disk. I modularized as an afterthought. But I don't see anything wrong with using types that have JS in their names. It is STILL a haskell data structure. Just one which can be converted to a relatively universally parse-able String easily when needed ;) It's fine if you don't use gtk. I just wanted to show off my code :) Timothy -- Původní zpráva -- Od: Rune Harder Bak r...@bak.dk Datum: 30. 11. 2012 Předmět: Re: [Haskell-cafe] Simple GUI Form I know it's not wx, but if you were willing to use GTK, you could simply install: http://hackage.haskell.org/package/gtk-jsinput and generate the form automatically as described in: https://github.com/timthelion/gtk-jsinput/blob/master/Graphics/UI/Gtk/Custom/JSInput.hs Cool! Would rather see it generated from the haskell data structure than from json, but you could of cause generate json from the data type. My understand is that GTK applications don't look and feel native on windows/mac, that's why I went for wx, but I could easily be wrong. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
Also GTK, but I ran across this a little while ago http://hackage.haskell. org/package/barrie not sure if it still builds as it's a bit old, but it looked interesting. -- Původní zpráva -- Od: Rune Harder Bak r...@bak.dk Datum: 1. 12. 2012 Předmět: Re: Re: [Haskell-cafe] Simple GUI Form Sure, and thanks for sharing. We need more declarative GUI building! On Sat, Dec 1, 2012 at 9:00 AM, timothyho...@seznam.cz wrote: I created that for a specific application I was writing, where I was saving the data directly to disk. I modularized as an afterthought. But I don't see anything wrong with using types that have JS in their names. It is STILL a haskell data structure. Just one which can be converted to a relatively universally parse-able String easily when needed ;) It's fine if you don't use gtk. I just wanted to show off my code :) Timothy -- Původní zpráva -- Od: Rune Harder Bak r...@bak.dk Datum: 30. 11. 2012 Předmět: Re: [Haskell-cafe] Simple GUI Form I know it's not wx, but if you were willing to use GTK, you could simply install: http://hackage.haskell.org/package/gtk-jsinput (http://hackage.haskell.org/package/gtk-jsinput) and generate the form automatically as described in: https://github.com/timthelion/gtk-jsinput/blob/master/Graphics/UI/Gtk/ Custom/JSInput.hs (https://github.com/timthelion/gtk-jsinput/blob/master/Graphics/UI/Gtk/Custom/JSInput.hs) Cool! Would rather see it generated from the haskell data structure than from json, but you could of cause generate json from the data type. My understand is that GTK applications don't look and feel native on windows/mac, that's why I went for wx, but I could easily be wrong.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
Of course. There is no reason to think that FRP is limited to real-time applications with complicated interactions. (...) there is a somewhat comprehensive tutorial [1] as well as lots of examples [2] linked from the wiki. Thank you for the links. I read it and looked at the examples. It seems you still need to build up the wx gui the same way as using wx directly and be sure it is in sync with the datatype. You just handle the logic with reactive-banana. As there really is almost no logic involved it gives too much overhead, needing to convert all the widgets to behaviors etc. I got the form working in wx, so I'll stick with that for now! Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
I know it's not wx, but if you were willing to use GTK, you could simply install: http://hackage.haskell.org/package/gtk-jsinput and generate the form automatically as described in: https://github.com/timthelion/gtk-jsinput/blob/master/Graphics/UI/Gtk/Custom/JSInput.hs Cool! Would rather see it generated from the haskell data structure than from json, but you could of cause generate json from the data type. My understand is that GTK applications don't look and feel native on windows/mac, that's why I went for wx, but I could easily be wrong. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Simple GUI Form
Hi I have some input parameters data Input = ... that I need the user to enter in a gui pop-up. (windows people...) The rest of the app is not gui (or perhaps progress could be displayed in a log-window) What is the easiest way to make such a GUI form? It need to compile for both Linux and Windows, so I though WxWidgets was ideal, and I got wx[1] 0.90 to install (using wxWidgets2.8) on both windows and linux. Now I just need to create the form, but how do you do that? Any clues or links to examples? I have never used wxwidgets on any platform or done any other form of GUI before for that matters. (apart from some Visual Basic ten years ago, and html). I tried looking at wx examples, but I couldn't find this simple use case explained anywhere. I installed wx in the first place because WxGeneric[2] seemed exactly what I needed, but I can't get it to compile using ghc7.4.2 from haskell-platform. Anybody got that working or have some other simple method? Help much appreciated! -Rune [1] http://hackage.haskell.org/package/wx-0.13.2.3 [2] http://hackage.haskell.org/package/WxGeneric ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
Hi there Rune, if you want to get started with declarative GUI programming in Haskell, I really recommend taking the FRP route. Check out the reactive-banana-wx [1] library instead of using wxHaskell directly. If you manage to get wxHaskell working on Windows, then reactive-banana will work as well. [1]: http://www.haskell.org/haskellwiki/Reactive-banana Greets, Ertugrul Rune Harder Bak r...@bak.dk wrote: I have some input parameters data Input = ... that I need the user to enter in a gui pop-up. (windows people...) The rest of the app is not gui (or perhaps progress could be displayed in a log-window) What is the easiest way to make such a GUI form? It need to compile for both Linux and Windows, so I though WxWidgets was ideal, and I got wx[1] 0.90 to install (using wxWidgets2.8) on both windows and linux. Now I just need to create the form, but how do you do that? Any clues or links to examples? I have never used wxwidgets on any platform or done any other form of GUI before for that matters. (apart from some Visual Basic ten years ago, and html). I tried looking at wx examples, but I couldn't find this simple use case explained anywhere. I installed wx in the first place because WxGeneric[2] seemed exactly what I needed, but I can't get it to compile using ghc7.4.2 from haskell-platform. Anybody got that working or have some other simple method? Help much appreciated! -Rune [1] http://hackage.haskell.org/package/wx-0.13.2.3 [2] http://hackage.haskell.org/package/WxGeneric -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad. signature.asc Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
I'm very interested in FRP, but all the examples I could see was forms with live feedback gui like a real-time calculator. This is a one-time form where the user fills everything in, clicks on a button, where after the computations might take a long time, perhaps display some console-info. But maybe this is a good use-case for reactive-banana as well? Do you have any good examples in this regard? On Thu, Nov 29, 2012 at 2:37 PM, Ertugrul Söylemez e...@ertes.de wrote: Hi there Rune, if you want to get started with declarative GUI programming in Haskell, I really recommend taking the FRP route. Check out the reactive-banana-wx [1] library instead of using wxHaskell directly. If you manage to get wxHaskell working on Windows, then reactive-banana will work as well. [1]: http://www.haskell.org/haskellwiki/Reactive-banana Greets, Ertugrul Rune Harder Bak r...@bak.dk wrote: I have some input parameters data Input = ... that I need the user to enter in a gui pop-up. (windows people...) The rest of the app is not gui (or perhaps progress could be displayed in a log-window) What is the easiest way to make such a GUI form? It need to compile for both Linux and Windows, so I though WxWidgets was ideal, and I got wx[1] 0.90 to install (using wxWidgets2.8) on both windows and linux. Now I just need to create the form, but how do you do that? Any clues or links to examples? I have never used wxwidgets on any platform or done any other form of GUI before for that matters. (apart from some Visual Basic ten years ago, and html). I tried looking at wx examples, but I couldn't find this simple use case explained anywhere. I installed wx in the first place because WxGeneric[2] seemed exactly what I needed, but I can't get it to compile using ghc7.4.2 from haskell-platform. Anybody got that working or have some other simple method? Help much appreciated! -Rune [1] http://hackage.haskell.org/package/wx-0.13.2.3 [2] http://hackage.haskell.org/package/WxGeneric -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
Rune Harder Bak r...@bak.dk wrote: I'm very interested in FRP, but all the examples I could see was forms with live feedback gui like a real-time calculator. This is a one-time form where the user fills everything in, clicks on a button, where after the computations might take a long time, perhaps display some console-info. But maybe this is a good use-case for reactive-banana as well? Of course. There is no reason to think that FRP is limited to real-time applications with complicated interactions. Do you have any good examples in this regard? Not myself, but there is a somewhat comprehensive tutorial [1] as well as lots of examples [2] linked from the wiki. I just want to stress the importance of the last tutorial section: FRP is not a concrete design pattern, but rather a family of them. The tutorial explains FRP as understood and implemented specifically by reactive-banana. There are a number of other practical libraries that use different notions, in particular of events. [1]: http://www.haskell.org/haskellwiki/ FRP_explanation_using_reactive-banana [2]: http://www.haskell.org/haskellwiki/Reactive-banana/Examples Greets, Ertugrul -- Key-ID: E5DD8D11 Ertugrul Soeylemez e...@ertes.de FPrint: BD28 3E3F BE63 BADD 4157 9134 D56A 37FA E5DD 8D11 Keysrv: hkp://subkeys.pgp.net/ signature.asc Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple GUI Form
I know it's not wx, but if you were willing to use GTK, you could simply install: http://hackage.haskell.org/package/gtk-jsinput and generate the form automatically as described in: https://github.com/timthelion/gtk-jsinput/blob/master/Graphics/UI/Gtk/ Custom/JSInput.hs Timothy -- Původní zpráva -- Od: Rune Harder Bak r...@bak.dk Datum: 29. 11. 2012 Předmět: [Haskell-cafe] Simple GUI Form Hi I have some input parameters data Input = ... that I need the user to enter in a gui pop-up. (windows people...) The rest of the app is not gui (or perhaps progress could be displayed in a log-window) What is the easiest way to make such a GUI form? It need to compile for both Linux and Windows, so I though WxWidgets was ideal, and I got wx[1] 0.90 to install (using wxWidgets2.8) on both windows and linux. Now I just need to create the form, but how do you do that? Any clues or links to examples? I have never used wxwidgets on any platform or done any other form of GUI before for that matters. (apart from some Visual Basic ten years ago, and html). I tried looking at wx examples, but I couldn't find this simple use case explained anywhere. I installed wx in the first place because WxGeneric[2] seemed exactly what I needed, but I can't get it to compile using ghc7.4.2 from haskell-platform. Anybody got that working or have some other simple method? Help much appreciated! -Rune [1] http://hackage.haskell.org/package/wx-0.13.2.3 (http://hackage.haskell.org/package/wx-0.13.2.3) [2] http://hackage.haskell.org/package/WxGeneric (http://hackage.haskell.org/package/WxGeneric) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe (http://www.haskell.org/mailman/listinfo/haskell-cafe)___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe