--- On Sun, 6/6/10, Fernando Benavides <greenmel...@gmail.com> wrote:
> I run into the same issue in the
> development of hpage.  The workaround I've found is to
> have a refresh timer ticking every (say) 100ms, something
> like:
> 
> _timer <- timer [interval := 100, on command := return
> ()]
> 
> Hope this helps.
> 
> PS: If I remeber well, I wrote a longer mail a while ago
> talking about this :)

Would that be this message?:

http://www.mail-archive.com/wxhaskell-users@lists.sourceforge.net/msg00840.html

I think that's done the trick!  After I'd stared blankly at this for a while, 
the penny dropped: the fix, if I'm following this right, is to do the GUI 
update asynchronously (i.e. in a forkIO), _and_ to use a timer of the desired 
granularity, as above.  This seems to work (though unfortunately also causes 
inconsistent updates violating a program invariant, a "freeHaskellFunctionPtr: 
not for me, guv!" error, and periodically a segmentation fault (I think this 
probably relates to combining concurrency and mutable variables, which I need 
to go fix next)).

Cheers,
Alex.


      

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to