|
|
Re: Validation with own AbstractObservableValue [message #490730 is a reply to message #490066] |
Fri, 09 October 2009 21:17 |
Eclipse User |
|
|
|
Originally posted by: TheRealHawk.Freenet.de
Could it be, that you've only implemented doGetValue() and doSetValue()?
You also have to observe your property or control and fire the events by
your self.
--> If you want to observe a control you should extend
AbstractSWTObservableValue
Greetings
Markus
"T. Wilhelm" <t.wilhelm@msh.de> schrieb im Newsbeitrag
news:hahfbq$sh5$1@build.eclipse.org...
> Hey all,
>
> i use databinding in my RCP application and i needed my own
> AbstractObservableValue. So i create a class (MyObservableValue), extend
> it from AbstractObservableValue and everything works fine first. Then i
> added a validator to my binding. My Problem now is that the validator is
> never called :( I
|
|
|
|
Re: Validation with own AbstractObservableValue [message #491027 is a reply to message #490736] |
Mon, 12 October 2009 21:19 |
Eclipse User |
|
|
|
Originally posted by: TheRealHawk.Freenet.de
Where can I find more informations about the new api?
Currently I only work with SWTObservables, BeansObservables, PojoObservables
and ViewersObservables.
What are IValueProperties and how to I use them?
Thanks
Markus
"Matthew Hall" <matthall@woodcraftmill.com> schrieb im Newsbeitrag
news:haoctv$69l$1@build.eclipse.org...
> AbstractSWTObservableValue is not public API and was removed in the latest
> version of DataBinding (June '09). The recommended approach is to use the
> new property API, there is a new API class WidgetValueProperty for this
> purpose.
>
> To extend WidgetValueProperty properly you need to do just a few things:
> * Implement the abstract getter and setter methods.
> * Implement the getValueType() method
> * If the widget property fires change events, pass the SWT event
> constant(s) to the superconstructor in your custom property's constructor
> * (Recommended) Implement toString() to provide a programmer-friendly
> description of the property.
>
> IWidgetValueProperty myCustomProp = new MyCustomWidgetProperty();
> ISWTObservableValue observable = myCustomProp.observe(theWidget);
>
> Hope this helps,
>
> Matthew
>
> Markus Koch wrote:
>> Could it be, that you've only implemented doGetValue() and doSetValue()?
>> You also have to observe your property or control and fire the events by
>> your self.
>> --> If you want to observe a control you should extend
>> AbstractSWTObservableValue
>>
>> Greetings
>>
>> Markus
>>
>> "T. Wilhelm" <t.wilhelm@msh.de> schrieb im Newsbeitrag
>> news:hahfbq$sh5$1@build.eclipse.org...
>>> Hey all,
>>>
>>> i use databinding in my RCP application and i needed my own
>>> AbstractObservableValue. So i create a class (MyObservableValue), extend
>>> it from AbstractObservableValue and everything works fine first. Then i
>>> added a validator to my binding. My Problem now is that the validator is
>>> never called :( I
|
|
|
|
Powered by
FUDForum. Page generated in 0.03130 seconds