Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT-ProgressBar Troubles on Pocket PC 2003
SWT-ProgressBar Troubles on Pocket PC 2003 [message #443355] Thu, 23 September 2004 10:08 Go to next message
Eclipse UserFriend
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
Re: SWT-ProgressBar Troubles on Pocket PC 2003 [message #443359 is a reply to message #443355] Thu, 23 September 2004 13:56 Go to previous messageGo to next message
Andy Czerwonka is currently offline Andy CzerwonkaFriend
Messages: 42
Registered: July 2009
Member
Ronald Langbauer wrote:

> 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.
>
[snip]
Doesn't the PPC using a different threading mechanism?
Re: SWT-ProgressBar Troubles on Pocket PC 2003 [message #443452 is a reply to message #443355] Fri, 24 September 2004 15:46 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Enter a problem report with the code. Thanks.

"Ronald Langbauer" <rla@nts-gmbh.com> wrote in message
news:ciu7bl$b73$1@eclipse.org...
> 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
>
Previous Topic:Move treeItem in a Tree?!!
Next Topic:Class Text accept only integer
Goto Forum:
  


Current Time: Thu Apr 25 05:05:09 GMT 2024

Powered by FUDForum. Page generated in 0.02853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top