SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.
Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
by cbwilliamsva » Fri Oct 08, 2004 9:25 am
Pardon the semi-braindead question.
I've got a very simple UI built - tab display, two tabs. First tab has a table with two columns, second tab has a multi-line text box.
I want to be able to add items to both the table and the text box dynamically from other events that are occurring outside the control of the UI. I've got the table and the text box specified as accessible fields but every time I try to update either I am getting a thread access exception.
What is the proper way to update the SWT user interface from external (non-UI) events?
Thank you in advance,
Chuck
-
cbwilliamsva
-
- Posts: 9
- Joined: Fri Oct 08, 2004 9:20 am
by Eric Clayberg » Fri Oct 08, 2004 1:51 pm
cbwilliamsva wrote:What is the proper way to update the SWT user interface from external (non-UI) events?
You need to use the Display syncExec(Runnable) or asyncExec(Runnable) method. See...
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by cbwilliamsva » Fri Oct 08, 2004 2:03 pm
Eric,
Thank you!
While waiting for a response, I was able to embed my updates into the main control loop via synchronized vectors. It seems to be working well, but I plan on implementing your suggestion.
Chuck
-
cbwilliamsva
-
- Posts: 9
- Joined: Fri Oct 08, 2004 9:20 am
Return to SWT Designer
Who is online
Users browsing this forum: No registered users and 1 guest