Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Appending to Text from non-UI thread
Appending to Text from non-UI thread [message #462118] Thu, 06 October 2005 19:06 Go to next message
Greg is currently offline GregFriend
Messages: 21
Registered: July 2009
Junior Member
All,

Ok I have figured out how to have a 'Run' button create a new thread (for a
long running process) and a 'Cancel' button that does cancel the new thread
(and it is messy). I could not seem to find any snippets or examples of
this, being that it is one of the main reasons to use threads (responsive
UI). But that's another email.

Anyway I would like to have the new thread to keep a Text field in the UI
updated with status messages as it runs. I have tried sending the Text
object to the thread but append gives an org.eclipse.swt.SWTException.



Thanks in advance,

Greg
Re: Appending to Text from non-UI thread [message #462120 is a reply to message #462118] Thu, 06 October 2005 19:38 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Use display.asyncExec with a runnable to update the Text.

Greg wrote:
> All,
>
> Ok I have figured out how to have a 'Run' button create a new thread (for a
> long running process) and a 'Cancel' button that does cancel the new thread
> (and it is messy). I could not seem to find any snippets or examples of
> this, being that it is one of the main reasons to use threads (responsive
> UI). But that's another email.
>
> Anyway I would like to have the new thread to keep a Text field in the UI
> updated with status messages as it runs. I have tried sending the Text
> object to the thread but append gives an org.eclipse.swt.SWTException.
>
>
>
> Thanks in advance,
>
> Greg
>
>

--
Thanks,
Rich Kulp
Previous Topic:Autoscroll in org.eclipse.swt.browser.Browser
Next Topic:SWT 3.1.1 Tree TreeItem background color columns treetable
Goto Forum:
  


Current Time: Sun May 12 14:15:32 GMT 2024

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

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

Back to the top