SWT-ProgressBar Troubles on Pocket PC 2003 [message #443355] |
Thu, 23 September 2004 10:08 |
Eclipse User |
|
|
|
Originally posted by: rla.nts-gmbh.com
Hello,
I have troubles implementing a progress bar which runs
in its own thread while waiting for database response.
The code I've used runs properly on SWT-Win32 whereas
the PPC implementation seems to be malfunctional when
used with multiple threads as it does not update the
progress indicator.
The code that I've used:
new Thread() {
public void run() {
for (final int[] i = new int[1]; i[0] <= maximum; i[0]++) {
try {Thread.sleep (10);} catch (Throwable th) {}
if (Display.getDefault().isDisposed()) return;
Display.getDefault().asyncExec(new Runnable() {
public void run() {
if (progressBar.isDisposed ()) return;
progressBar.setSelection(i[0]);
}
});
}
}
}.start();
Possibly anyone has experienced the same issue and can
provide me with a workaround?!
Thanks,
Ron
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02853 seconds