Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [Databinding] Put data to a WritableMap from other Thread
[Databinding] Put data to a WritableMap from other Thread [message #1018151] Wed, 13 March 2013 09:10 Go to next message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
Hello,

I do like to put data into a org.eclipse.core.databinding.observable.map.WritableMap from another Thread, but the checkRealm() method throws an AssertionFailedException Exception with the Message "This operation must be run within the observable's realm", because the current Realm of the WritableMap is not used.

So I tried to use Realm.getDefault().asyncExec(), but then Realm.getDefault() just returns null and causes an NPE Sad

Do you have an idea how databinding and multithreading can be combined?

Best regards,

Simon
Re: [Databinding] Put data to a WritableMap from other Thread [message #1018156 is a reply to message #1018151] Wed, 13 March 2013 09:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You need to get the realm from the WritableMap!

Tom

Am 13.03.13 10:10, schrieb Simon SSC:
> Hello,
>
> I do like to put data into a
> org.eclipse.core.databinding.observable.map.WritableMap from another
> Thread, but the checkRealm() method throws an AssertionFailedException
> Exception with the Message "This operation must be run within the
> observable's realm", because the current Realm of the WritableMap is not
> used.
>
> So I tried to use Realm.getDefault().asyncExec(), but then
> Realm.getDefault() just returns null and causes an NPE :(
>
> Do you have an idea how databinding and multithreading can be combined?
>
> Best regards,
>
> Simon
Re: [Databinding] Put data to a WritableMap from other Thread [message #1018184 is a reply to message #1018156] Wed, 13 March 2013 10:32 Go to previous message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
Hello Tom,

I didn´t expect such an easy answer.
Thanks a lot Smile

Best regards,

Simon
Previous Topic:Remove / Change Highlight-Color of ListViewer
Next Topic:ScrolledForm Layout Problem
Goto Forum:
  


Current Time: Tue Apr 16 13:37:13 GMT 2024

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

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

Back to the top