So here is the basic layout:

- flow
- stack
- flow

The stack in the middle is set to a fixed height and scrollable. It is
populated by a method which is called inside a clear() block sent to
the stack.

The first time this happens, on app load, everything works great. Then
a timer is setup to redo this process every minute. (A Twitter client
refreshing the timeline.) Every time after the first it fails to
repaint properly, and how. It seems like it tries to redraw *after*
the final flow, although what it's actually trying to do isn't clear
as it seems to just draw a bunch of empty space and a small bit of
something resembling what is intended wayyyy at the end.

Some screens:
http://www.flickr.com/photos/sequitography/2840932715 - success
http://www.flickr.com/photos/sequitography/2840935351 - fail: part 1
http://www.flickr.com/photos/sequitography/2841773538 - fail: part 2

Here are what I think are the relevant bits of the app:
http://gist.github.com/9578

Full details can be inspected here:
http://github.com/greatseth/aglet/tree/master

This is behavior that worked just fine once upon a time. I wasn't
paying close attention to Shoes commits around the time it broke to
have an idea of where things went wrong, sadly.

I tried an approach where instead of sitting in the same Shoes url and
calling on methods which meddle with instance variables, I actually
revisited the Shoes url during the timer loop. This works as far as
the painting problem goes, but presents a few other significant
problems. Instance variables are reset, not to mention everything is
redrawn. This app involves entering text into an edit_line, and if you
are still working when the timer resets, the visit() technique means
that you lose your work when the whole view redraws.

-- 
Seth Thomas Rasmussen
http://greatseth.com

Reply via email to