Re: [Haskell-cafe] wxhaskell : how to generate an event?

2011-10-11 Thread Dmitriy Nikitinskiy

10.10.2011 16:42, Johannes Waldmann пишет:

Dear all,

in wxHaskell (core) I can set and get event handlers
http://hackage.haskell.org/packages/archive/wxcore/0.12.1.7/doc/html/Graphics-UI-WXCore-Events.html
but how is it possible to create events (programmatically)
and somehow feed them into the main event handling loop?

I think I need this in an application that needs to handle
concurrently events that arrive via the GUI (like mouse clicks)
and events from an external source (specifically, alsa-midi input).

Of course I could handle those extra events separately from wxcore,
but they should ultimately result in changes to the GUI state,
and it feels dangerous to do this without synchronisation.

Any hints welcome. Thanks - J.W.


Hello, hope this helps:
http://snipplr.com/view/17538/

At least this is works for me.

Regards,
Dmitriy

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Dmitriy Nikitinskiy

08.07.2011 10:08, Heinrich Apfelmus пишет:

Dear Haskellers,

Can GUI programming be liberated from the IO monad? Functional Reactive 
Programming (FRP) promises as much, and I'm trying to make this dream a reality 
with my [reactive-banana][] library. Having released version 0.4.0.0, I am now 
looking for example programs to direct the future evolution of the library.

Do you know any *small GUI programs* that you would *like* to see *implemented 
with Functional Reactive Programming?*

I'm sure that some of you

* are interested in FRP and would like to learn from a few simple but beautiful 
examples
* or have written small GUI programs that they are unhappy with because they 
were not purely functional
* or have thought about FRP before and concocted a few examples that are very 
tricky to implement with FRP
* or have written a nice little GUI application that simply makes a great 
example.

I would love to hear your examples, so that I can try to convert them to FRP 
style and test my library against them!

Strictly speaking, it doesn't have to be an example with a graphical interface, 
I'm also interested in audio and animation examples, though I'm currently 
focusing on GUIs.


Maybe realize on FRP one of following bored examples:

CRUD table: create, update, delete records in table (for example Person 
records), with validating user input, auto-calculated fields (current age by 
birth date), totals by column, filtering. I think same GUI tasks get solved 
many GUI developers in imperative style. I hope solution of such day-tasks in 
FRP will be elegant

Simple GUI designer (uml-diagrams or reports): very intresting to see FRP 
approach (events on custom drawing elements, inplace modification of elements)

Best regards,
Dmitriy

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe