SWTException: Invalid thread access when binding in non-UI thread [message #12141] |
Mon, 08 June 2009 13:53  |
Eclipse User |
|
|
|
I'm binding two observables - SWT Text to a WritableValue. They are in
different realms and I'm doing the binidng in a non-UI thread.
DataBindingContext#bindValue throws and SWTException because it tries to add
a listener to a widget without executing the code in the display realm:
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.SWT.error(SWT.java:3770)
at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355)
at org.eclipse.swt.widgets.Widget.addListener(Widget.java:181)
at
org.eclipse.jface.internal.databinding.swt.SWTVetoableValueD ecorator.firstListenerAdded(SWTVetoableValueDecorator.java:6 9)
at
org.eclipse.core.databinding.observable.ChangeManager.addLis tener(ChangeManager.java:70)
at
org.eclipse.core.databinding.observable.value.DecoratingObse rvableValue.addValueChangeListener(DecoratingObservableValue .java:44)
at org.eclipse.core.databinding.ValueBinding.<init>(ValueBinding.java:73)
at
org.eclipse.core.databinding.DataBindingContext.bindValue(Da taBindingContext.java:155)
at
org.eclipse.core.databinding.DataBindingContext.bindValue(Da taBindingContext.java:121)
Shouldn't DataBindingContext respect the Realm for adding listeners?
-Will
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02511 seconds