Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [Databinding] Re: newbie: How fire a changed value on a writable from a thread other than the real
[Databinding] Re: newbie: How fire a changed value on a writable from a thread other than the real [message #331318] Mon, 01 September 2008 07:43 Go to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

1. Let's move this thread to eclipse.platform because this is where
databinding is discussed
2. My impression was always that this is exactly the task of the Realm
(syncing from back from a NONE-UI thread but I could be wrong here).

Tom


Lars Vogel schrieb:
> Hi Zos,
>
> if you use the bean binding the UI should be updated automatically. The
> bean will trigger the PropertyChangeListener and the UI will update. If
> you running into threat issues have a look here:
> http://wiki.eclipse.org/FAQ_Why_do_I_get_an_invalid_thread_a ccess_exception%3F
>
>
> Best regards, Lars
>
> Hzosrothko wrote:
>> Hello
>>
>> I have a JFaceDataBinding UI/Model communication based on the Writable
>> class. Everything is fine for updating values between the UI and the
>> Model, Thanks to the JFace team!!
>> but I have now to update a value in the model from a thread different
>> from the realm one, and this value should be reflected too in the UI.
>>
>> What is the best way to solve this problem ??
>>
>> TIA
>> zos
>>
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: [Databinding] Re: newbie: How fire a changed value on a writable from a thread other than the re [message #331329 is a reply to message #331318] Mon, 01 September 2008 21:11 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Correct. Here's what you want to do:

final IObservableValue observable = ... // your observable
final Object newValue = ... // the new value you want to set

observable.getRealm().exec(new Runnable() {
public void run() {
observable.setValue(newValue);
}
});

Matthew

Tom Schindl wrote:
> Hi,
>
> 1. Let's move this thread to eclipse.platform because this is where
> databinding is discussed
> 2. My impression was always that this is exactly the task of the Realm
> (syncing from back from a NONE-UI thread but I could be wrong here).
>
> Tom
>
>
> Lars Vogel schrieb:
>> Hi Zos,
>>
>> if you use the bean binding the UI should be updated automatically.
>> The bean will trigger the PropertyChangeListener and the UI will
>> update. If you running into threat issues have a look here:
>> http://wiki.eclipse.org/FAQ_Why_do_I_get_an_invalid_thread_a ccess_exception%3F
>>
>>
>> Best regards, Lars
>>
>> Hzosrothko wrote:
>>> Hello
>>>
>>> I have a JFaceDataBinding UI/Model communication based on the
>>> Writable class. Everything is fine for updating values between the UI
>>> and the Model, Thanks to the JFace team!!
>>> but I have now to update a value in the model from a thread different
>>> from the realm one, and this value should be reflected too in the UI.
>>>
>>> What is the best way to solve this problem ??
>>>
>>> TIA
>>> zos
>>>
>>
>>
>
>
Previous Topic:How to programmatically waiting for build to complete?
Next Topic:JNI Shared Library fails to load from fragment on AIX
Goto Forum:
  


Current Time: Fri Nov 08 22:47:08 GMT 2024

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

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

Back to the top