pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: last revision (1101269) problem.
Date Tue, 10 May 2011 20:10:32 GMT
Sounds like you are not wrapping your TaskListener in a TaskAdapter. You need to do this to
ensure that the handler is called on the UI thread.

On May 10, 2011, at 4:02 PM, Olivier Dutrieux wrote:

> Le 10/05/2011 13:20, Noel Grandin a écrit :
>> Hi
>> 
>> Do you have a test-case (ie. some sample code) for this?
>> 
>> Thanks, Noel.
>> 
>> 
> 
> In fact the real exception is :
> 
> java.lang.IllegalStateException: this method can only be called from the AWT event dispatch
thread
>    at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:853)
>    at org.apache.pivot.wtk.WTKListenerList.iterator(WTKListenerList.java:79)
>    at org.apache.pivot.wtk.ActivityIndicator$ActivityIndicatorListenerList.activeChanged(ActivityIndicator.java:29)
>    at org.apache.pivot.wtk.ActivityIndicator.setActive(ActivityIndicator.java:50)
> 
> I think is due to the new verification (Container.assertEventDispatchThread()) on all
wtk components. I active the ActivityIndicator on the execute method of my task.
> 
> What is the best pratice ?
> 
> see my attach sample.
> 
> Duto
> <src.rar>


Mime
View raw message