Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » PropertySheet and CelleEditor updates
PropertySheet and CelleEditor updates [message #205440] Fri, 16 December 2005 15:16
Eclipse UserFriend
Originally posted by: marian.schedenig.gft.com

Our model classes use internal types to manage their properties, but we
use Strings and the standard TextPropertyDescriptors for the property sheet.

It seems to be a problem when the string used to set a new property
value does not match the value returned for that property afterwards
exactly. For example, when we set a length to "2cm", the new string
represenation returned by the model will be "2.0 cm". The property sheet
will immediately display this new value, but the underlying
TextCellEditor seems to be stuck with the old "2cm" string.

What happens is this: I set a value to "2cm", a command is created to
set my model's property, the property sheet triggers and update and
displays the new value returned by the model, which is "2.0 cm". Now I
click anywhere in my graphical editor, leaving the property sheet, which
automatically triggers PropertySheetEntry.applyEditorValue(). This
method now compares the model's current actual property value ("2.0 cm")
with the value currently stored in the CellEditor - which is "2cm", even
though the property sheet already displays the correct "2.0 cm"
representation. Result: PropertySheetEntry thinks I changed the property
and calls another command to set the propery. In the end, I've set the
property twice, and I have to call the Undo action twice to get the
original setting back.

Is it a bug in my code that's causing the CellEditor to be stuck with
the old value? Is something wrong with GEF (I'm using 3.1.0)? Or am I
misunderstandig the property sheet concept somewhere along the path?

Thanks,
Marian.
Previous Topic:Is there any example for Using GEF with UML2?
Next Topic:How to transform Rectangle to 3d Cube
Goto Forum:
  


Current Time: Thu Apr 25 04:59:41 GMT 2024

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

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

Back to the top