Home » Eclipse Projects » Remote Application Platform (RAP) » Wrong UI Thread
Wrong UI Thread [message #84049] |
Tue, 22 April 2008 11:57  |
Eclipse User |
|
|
|
Hi ,
I Have problems with UI Thread and other threads, "I guess". my case is
like this:
* I have a shell with a Form, and inside this form there is a table.
* The table data should be updated Constantly by a Thread "SenderThread /
it is a java class implements Runnable interface". This Thread is started
by Search Action Class.
* within the shell there is a method "AddData" that has
getDisplay().asyncExec(new Runnable() { , and responsible to recieve the
updated Data from the Thread "SenderThread".
*Also the shell window, has a some text fields and button for search
action,So when the user click on the button the Search Action will be
activated, and "SenderThread" will start operate.
* SenderThread Class should first change the visibilty of progressBar to
true , then start collecting data ,update the progressBas with progress
then update the table with the collected data
"MyShellWindow.AddData(List), Lastly stop the progressbar.
**** My problem is:
1: My data on table is not updated by SenderThread , when I
click of serch button to start SenderThread operations
2: When i debug the program, the MyShell instance within
SenderThread Class shows a value with "WrongThread".
3: the progressBar is not operate as suppose to, it dont stop
and start as supposed
4: When I click of serch button to start SenderThread
operations, and then press on any other buttons i have on
my
Shell, or write some text on my text field ,,,I get every
things work fine as my table get updated and progress bar
start and progress corectly.
Any suggestion to solve the problem
Regards
Salwa
|
|
|
Re: Wrong UI Thread [message #84066 is a reply to message #84049] |
Tue, 22 April 2008 12:44   |
Eclipse User |
|
|
|
Hi Salwa,
that sounds very much like you haven't enabled asynchronous
UI-Callbacks. See the javadoc of UICallBack#activate() or previous posts
for more information.
Regards,
Stefan.
Salwa schrieb:
> Hi , I Have problems with UI Thread and other threads, "I guess". my
> case is like this:
> * I have a shell with a Form, and inside this form there is a table.
> * The table data should be updated Constantly by a Thread "SenderThread
> / it is a java class implements Runnable interface". This Thread is
> started by Search Action Class. * within the shell there is a method
> "AddData" that has getDisplay().asyncExec(new Runnable() { , and
> responsible to recieve the updated Data from the Thread "SenderThread".
> *Also the shell window, has a some text fields and button for search
> action,So when the user click on the button the Search Action will be
> activated, and "SenderThread" will start operate.
> * SenderThread Class should first change the visibilty of progressBar to
> true , then start collecting data ,update the progressBas with progress
> then update the table with the collected data
> "MyShellWindow.AddData(List), Lastly stop the progressbar.
> **** My problem is:
> 1: My data on table is not updated by SenderThread , when I
> click of serch button to start SenderThread operations
> 2: When i debug the program, the MyShell instance within
> SenderThread Class shows a value with "WrongThread".
>
> 3: the progressBar is not operate as suppose to, it dont
> stop and start as supposed
>
> 4: When I click of serch button to start SenderThread
> operations, and then press on any other buttons i have on
> my Shell, or write some text on my text field ,,,I get every
> things work fine as my table get updated and progress bar
> start and progress corectly.
>
> Any suggestion to solve the problem
>
> Regards Salwa
>
>
>
|
|
| | | |
Goto Forum:
Current Time: Sun Aug 31 03:14:53 EDT 2025
Powered by FUDForum. Page generated in 0.03894 seconds
|