From: Johan Henriksson <mahogny@ar...> - 2005-12-30 19:27:58
for certain reasons I need to run several OS threads and now I
need to pass some data to the GUI. I know that wxhaskell is not
threadsafe but when I look at wxwindows docs I find the function
void AddPendingEvent(wxEvent& event)
which seem to do what I want to. As it's below wxhaskell and actually
made for this purpose, I don't see a major problem in using it.
the question is, how do I call this function with wxhaskell?
I don't see this function exported anywhere. It would be sufficient
if I just could send an idle event (although a custom event would be
better; whatever works) from the thread and then let an event handler
in the GUI do the rest of the fiddling (this at least avoids polling).
so, essentially, how do I call this? do anyone have some code I can
cutnpaste from? I can't reasonably be the first one with this problem.
From: Arjan van IJzendoorn <afie@cs...> - 2006-01-03 22:17:10
> void AddPendingEvent(wxEvent& event)
> so, essentially, how do I call this?
The functions are exported in wxCore. See
evtHandlerAddPendingEvent :: EvtHandler a -> Event b -> IO ()
usage: (evtHandlerAddPendingEvent obj event).