As discussed, the setTimeout() and setInterval() methods in ApplicationContext 
have been replaced by the following new methods:

public static ScheduledCallback scheduleCallback(Runnable callback, long delay);

public static ScheduledCallback scheduleRecurringCallback(Runnable callback, 
long period);
public static ScheduledCallback scheduleRecurringCallback(Runnable callback, 
long delay, long period);

ScheduledCallback extends java.util.TimerTask. It wraps the actual callback and 
executes it on the UI thread. Returning it from these methods allows the caller 
to cancel the task.

The addition of the third method offers more flexibility than we previously 
had, since the old setInterval() method used a fixed delay of 0. This 
simplified the implementation of auto-scrolling in TerraScrollBarSkin and 
TerraSpinnerSkin.

Noel and Chris, thanks for the great suggestion to change this API.

Greg


Reply via email to