From: <jmv...@di...> - 2007-02-19 11:55:36
|
Hi,=20 After losts of surfing in Google and in wxHaskell Haddock documentation = I find out this possible solution that works fine for my case=20 wxcAppYield (http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.WxcClassesMZ.htm= l#v %3AwxcAppYield ) or its variant=20 wxcAppSafeYield (http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.WxcClassesMZ.htm= l#v %3AwxcAppSafeYield ) It is simple as calling this function before testing if a certain button = had been pressed and its call-back had update the state of the application accordingly. Thanks for your help. Best Miguel Vila=E7a=20 -----Mensagem original----- De: Eric Y. Kow [mailto:eri...@gm...]=20 Enviada: domingo, 18 de Fevereiro de 2007 20:58 Para: Jos=E9 Miguel Vila=E7a Cc: wxHaskell mailing list Assunto: Re: [wxhaskell-users] Stop do not stop; not multi-threaded? Hi, On Mon, Feb 05, 2007 at 16:17:41 -0000, Jos=E9 Miguel Vila=E7a wrote: > In theory this seems the solution but when I tested it I find out that = it > doesn=92t. The very long computation gets the attention of the = processor and > blocks the graphical interface; clicking the Stop button don=92t fire = the > actions. Does calling wxcAppSafeYield in your long computation (look in the index of the API) help? I don't actually know the answer, just making some guesses. You might want to look into what Dazzle/XTC do, otherwise. And if it does help, maybe you could write something up on the Haskell wiki so that other programmers won't have to suffer! Best, --=20 Eric Kow http://www.loria.fr/~kow PGP Key ID: 08AC04F9 Merci de corriger mon fran=E7ais. |