Skip to main content



      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 05:10 Go to next message
Eclipse UserFriend
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 05:26 Go to previous messageGo to next message
Eclipse UserFriend
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 06:32 Go to previous message
Eclipse UserFriend
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 Jul 22 13:46:19 EDT 2025

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

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

Back to the top