Re: GUIs and events

Alastair Reid <[email protected]>
Newsgroups gmane.comp.lang.haskell.gui
Message-ID <[email protected]>
Nick Name <[email protected]> writes:
> GUI libraries wich make the application hang when a dialog is
> created are a bad idea. We need to have a way, even in hugs, to
> control the events that are to be sent to the underlying parent
> window when a dialog is created.

Note that the HGL successfully does this on Hugs so we know that this
can be implemented.  A demonstration would be something like:

- One window running an animation serviced by its own Haskell thread.
- One window running a dialog box asking if you want to quit.

Obviosuly, we'd need to make any reactive widgets in the animation
window unresponsive while the dialog box is open.  This isn't quite
the same as blocking all events though because, for example, the
animation window should still respond to redraw events.

[What can't be implemented on Hugs is to have a thread doing some big
calculation (like factoring large numbers) in one thread while other
threads continue to run.  The difference is because threads can only
be preempted when in the IO monad (and, at least for now, only at
certain places in the IO monad).]

--
Alastair Reid                 [email protected]  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.