EMF Databinding with double values [message #1019206] |
Fri, 15 March 2013 04:38  |
Eclipse User |
|
|
|
Hi,
in my RCP I use EMF databinding. In this case an SWT Text should be bind to an field that is a double. Therefore I use:
IObservableValue observeTextObserveWidget = WidgetProperties.text(SWT.FocusOut).observe(text);
IObservableValue currentSelectionObserveValue = EMFEditObservables.observeValue(editingDomain, currentSelection, Literals.USER__VALUE);
bindingContext.bindValue(observeTextObserveWidget, currentSelectionObserveValue, null, null);
But this text field doesn't show anything. And if I type in a value, it isn't set in the model.
Do I miss something in the usage of EMF databinding with double values?
The databinding of this double works within a TableViewer and also works with this text field, when I use Bean Databinding.
Best regards
Bastian
|
|
|
Re: EMF Databinding with double values [message #1019338 is a reply to message #1019206] |
Fri, 15 March 2013 09:28   |
Eclipse User |
|
|
|
you don't show use the DatabindingContext you create but my guess is
that it is *NOT* an EMFDatabindingContext which is *has to be* to make
conversions work!
Tom
Am 15.03.13 09:38, schrieb Bastian Wagenfeld:
> Hi,
>
> in my RCP I use EMF databinding. In this case an SWT Text should be bind
> to an field that is a double. Therefore I use:
> IObservableValue observeTextObserveWidget =
> WidgetProperties.text(SWT.FocusOut).observe(text);
> IObservableValue currentSelectionObserveValue =
> EMFEditObservables.observeValue(editingDomain, currentSelection,
> Literals.USER__VALUE);
> bindingContext.bindValue(observeTextObserveWidget,
> currentSelectionObserveValue, null, null);
> But this text field doesn't show anything. And if I type in a value, it
> isn't set in the model.
> Do I miss something in the usage of EMF databinding with double values?
> The databinding of this double works within a TableViewer and also works
> with this text field, when I use Bean Databinding.
>
> Best regards
> Bastian
|
|
|
|
Powered by
FUDForum. Page generated in 0.03393 seconds