TurboPack / Orpheus

Orpheus is an award-winning UI toolkit for Embarcadero Delphi & C++Builder
Other
98 stars 36 forks source link

Problem assigning string to a TOvcPictureField with a PictureMask #42

Open MauriceI opened 1 year ago

MauriceI commented 1 year ago

Hi,

I've run into a problem when using a TOvcPictureField with a PictureMask.

In a simple test case I have a form with a single TOvcPictureField. It has a PictureMask of AA-99-9999-999 and all the other properties are left to their default. When I try to set the value to VH-88-8888-888 using the code below the field end up with a value of VH--8-8-88-88-

OvcPictureField1.AsString := 'VH-88-8888-888';

I was able to trace the issue to commit c0c2e3e. In it change, the check to strip mask characters from the input string before merging it with the mask was changed so it no longer includes strings which are the same length as the mask which is the case in this scenario.

Before changing it back I would like to understand the logic behind why this was changes and for which scenario it applies.

Thanks for your help!