From: Fergus W. <fer...@ya...> - 2010-06-07 21:58:07
|
--- On Sun, 6/6/10, Fernando Benavides <gre...@gm...> 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/wxh...@li.../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. |