Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » SWT UI-threading issue
SWT UI-threading issue [message #26208] Sat, 21 September 2002 01:12 Go to next message
Eclipse UserFriend
Originally posted by: pschork.teleias.com

Hi, I'm new SWT and GUI programming so forgive me if this should be
obvious. I've read through the SWT Threading issue doc but I'm still having
problems allowing my worker thread to communicate with my Shell.

http://www.eclipse.org/documentation/html/plugins/org.eclips e.platform.doc.i
sv/doc/guide/swt_threading.htm

I've got a simple shell application that spawns a worker thread (inner
class) . I want the worker thread to update the progress bar on the shell as
it goes. I've tried calling Display.getCurrent().asyncExec( ) from the
worker thread to update the progress bar but my worker thread can not
access the Display (UI-thread I guess). Any advice or example code would be
great.
Thanks,

Patrick
Re: SWT UI-threading issue [message #28308 is a reply to message #26208] Sun, 29 September 2002 16:47 Go to previous message
Eclipse UserFriend
Originally posted by: tmaeder0906.rogers.com

Patrick,

what you want is not the display of the worker thread, but of the UI
thread. So you'll have to pass the display of the UI thread somehow (in
the constructor, for example) to the worker thread.

By the way, you're much more likely to get answers for questions like
this in the eclipse.tools newsgroup

Thomas

PSchork wrote:
> Hi, I'm new SWT and GUI programming so forgive me if this should be
> obvious. I've read through the SWT Threading issue doc but I'm still having
> problems allowing my worker thread to communicate with my Shell.
>
> http://www.eclipse.org/documentation/html/plugins/org.eclips e.platform.doc.i
> sv/doc/guide/swt_threading.htm
>
> I've got a simple shell application that spawns a worker thread (inner
> class) . I want the worker thread to update the progress bar on the shell as
> it goes. I've tried calling Display.getCurrent().asyncExec( ) from the
> worker thread to update the progress bar but my worker thread can not
> access the Display (UI-thread I guess). Any advice or example code would be
> great.
> Thanks,
>
> Patrick
>
>
Re: SWT UI-threading issue [message #583712 is a reply to message #26208] Sun, 29 September 2002 16:47 Go to previous message
Eclipse UserFriend
Originally posted by: tmaeder0906.rogers.com

Patrick,

what you want is not the display of the worker thread, but of the UI
thread. So you'll have to pass the display of the UI thread somehow (in
the constructor, for example) to the worker thread.

By the way, you're much more likely to get answers for questions like
this in the eclipse.tools newsgroup

Thomas

PSchork wrote:
> Hi, I'm new SWT and GUI programming so forgive me if this should be
> obvious. I've read through the SWT Threading issue doc but I'm still having
> problems allowing my worker thread to communicate with my Shell.
>
> http://www.eclipse.org/documentation/html/plugins/org.eclips e.platform.doc.i
> sv/doc/guide/swt_threading.htm
>
> I've got a simple shell application that spawns a worker thread (inner
> class) . I want the worker thread to update the progress bar on the shell as
> it goes. I've tried calling Display.getCurrent().asyncExec( ) from the
> worker thread to update the progress bar but my worker thread can not
> access the Display (UI-thread I guess). Any advice or example code would be
> great.
> Thanks,
>
> Patrick
>
>
Previous Topic:Activate a Listener in my Eclipse Plugin
Next Topic:Package Explorer
Goto Forum:
  


Current Time: Sat Dec 07 00:18:34 GMT 2024

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

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

Back to the top