ViewerSupport.bind issue in a ViewPart [message #11988] |
Thu, 04 June 2009 20:40 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
I am trying to do something like:
ViewerSupport.bind(viewer,BeansObservables.observeList(Model Provider.getInstance(),
"items"),BeanProperties.values(new String[] { "itemName",
"price", "quantity", "subtotal" } ) );
But I get an exception "Realm cannot be null". However, this is a JFace
ViewPart that is called in a JFace tab. How in the world would I
instantiate a Realm in a ViewPart???
|
|
|
Re: ViewerSupport.bind issue in a ViewPart [message #17696 is a reply to message #11988] |
Tue, 30 June 2009 19:41 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Will Horn![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=will.horn%40gmail.com) Messages: 265 Registered: July 2009 |
Senior Member |
|
|
Are you running that code in the UI thread? In an Eclipse/RCP application
the UI thread has a default realm based on the SWT Display. All UI code in
the event loop generally does not need to worry about the Realm.
But if you have another thread, or if you are not using
Workbench#createAndRunWorkbench, then you have to deal with the
realm/synchronization issues yourself. See
http://wiki.eclipse.org/JFace_Data_Binding/FAQ#What_is_a_Rea lm.2C_and_do_I_need_to_care.3F
for more info.
Will
"Igor Ganapolsky" <eazyigz@gmail.com> wrote in message
news:e5602c311b4403ea124ec53ba71d165b$1@www.eclipse.org...
>I am trying to do something like:
> ViewerSupport.bind(viewer,BeansObservables.observeList(Model Provider.getInstance(),
> "items"),BeanProperties.values(new String[] { "itemName",
> "price", "quantity", "subtotal" } ) );
> But I get an exception "Realm cannot be null". However, this is a JFace
> ViewPart that is called in a JFace tab. How in the world would I
> instantiate a Realm in a ViewPart???
>
|
|
|
Powered by
FUDForum. Page generated in 0.03107 seconds