|
Re: proper way to constrain org.eclipse.gef.ui.properties.SetValueCommand for an IPropertySource? [message #205696 is a reply to message #205670] |
Tue, 20 December 2005 18:11 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You should be constraining the value by setting a validator on the
celleditor when the descriptor constructs the cell editor.
"Drew" <drew@acm.org> wrote in message
news:do9b3g$ca4$1@utils.eclipse.org...
>I am trying to constrain an IPropertySource and display an error if the
> constraint is hit. Unfortunely it seems that
> IPropertySource.setPropertyValue is getting getting called multiple times
> when the value in the cell editor chnages.
>
> First Time: I catch it and do not set the value of the internal model
> object.
> Second Time: Cell editor reverts text to the previous (done automagically)
> Third Time : Chnage selection causes setPropertyValue to be called again.
> (done automagically)
>
>
> Is there a better way to constrain the propertySource values. (The value
> is
> a text string that I need to check).
>
>
>
>
|
|
|
Re: proper way to constrain org.eclipse.gef.ui.properties.SetValueCommand for an IPropertySource? [message #205726 is a reply to message #205670] |
Wed, 21 December 2005 13:55 |
Eclipse User |
|
|
|
Originally posted by: marian.schedenig.gft.com
Drew schrieb:
> Unfortunely it seems that
> IPropertySource.setPropertyValue is getting getting called multiple times
> when the value in the cell editor chnages.
I'm having the same problem; I posted a question on Dec 16, but didn't
get an answer so far. In my case, the problem is that the displayed
value may differ from the value the user entered (stripped spaces etc.),
which causes the property to be set twice. I'm still looking for a way
to prevent this.
Marian.
|
|
|
Powered by
FUDForum. Page generated in 0.02686 seconds