Hi, 

After losts of surfing in Google and in wxHaskell Haddock documentation I
find out this possible solution that works fine for my case 

wxcAppYield
(http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.WxcClassesMZ.html#v
%3AwxcAppYield )
or its variant 
wxcAppSafeYield
(http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.WxcClassesMZ.html#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ça 

-----Mensagem original-----
De: Eric Y. Kow [mailto:[EMAIL PROTECTED] 
Enviada: domingo, 18 de Fevereiro de 2007 20:58
Para: José Miguel Vilaça
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é Miguel Vilaça wrote:
> In theory this seems the solution but when I tested it I find out that it
> doesn’t. The very long computation gets the attention of the processor and
> blocks the graphical interface; clicking the Stop button don’t 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,

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxhaskell-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to