Curiously, if I call run() via a ScheduledCommand off of my onComplete() it works fine.
On Nov 22, 6:34 pm, KaffeineComa <[email protected]> wrote: > I have a simple anonymous Animation extension that manipulates an > element's backgroundColor. It works fine, until I try to "loop" the > animation by calling run() via onComplete. This causes the JVM to > crash hard with: > > Invalid access of stack red zone 0x1674b6fe8 rip=0x1010c307f > > This is in Safari on a Mac. > > I understand that this kind of error tends to indicate a blown stack. > Interestingly, if I add logging output in my onStart() I only ever see > a single call to it, whereas onComplete() is called repeatedly. Are > animations not intended to be re-runnable? > > public class ColorAnimation extends Animation > { > private int halfTime; > private String startColor, endColor; > > public ColorAnimation(String startColor, String endColor, int > animTime) > { > this.startColor = startColor; > this.endColor = endColor; > halfTime = animTime / 2; > } > > @Override > protected void onStart() > { > super.onStart(); > GWT.log("onStart()..."); > } > > @Override > protected void onUpdate(double progress) > { > String color = between(startColor, endColor, progress); > getElement().getStyle().setProperty("backgroundColor", > color); > } > > @Override > protected void onComplete() > { > super.onComplete(); > > GWT.log("onComplete"); > String tmp = startColor; > startColor = endColor; > endColor = tmp; > run(halfTime); > } > } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
