View Issue Details

IDProjectCategoryView StatusLast Update
0003587JEDI VCL00 JVCL Componentspublic2006-03-25 12:45
ReporterdelphiAssigned Toelahn 
Status resolvedResolutionfixed 
PlatformDelphi 6 PersonalOSWindows XPOS VersionHome Edition SP2
Product Version3.10 
Target VersionFixed in Version3.30 
Summary0003587: TJvValidateEdit: doesn't validate if set at design time (dtCheckChars)

TJvValidate doesn't validate text if DiplayFormat is set to dtCheckChars and if CheckChars property is set at design time.

It runs if you set CheckChars property at run time, e.g.:

JvValidateEdit1.CheckChars := '0123456789,.-\|/';
TagsNo tags attached.



2006-03-24 16:46

reporter   ~0008723

It is a problem with the order of initialization.

It tries to set the Check Chars (from Design time) before the DisplayFormat is set from Design time.

Then it fails this test:

procedure TJvCustomValidateEdit.SetCheckChars(const NewValue: string);
  if (FDisplayFormat in [dfNone, dfCheckChars, dfNonCheckChars]) and
    (FCheckChars <> NewValue) then
    FCheckChars := NewValue;
    EditText := MakeValid(FEditText);

2006-03-25 00:10


JvValidateEdit.pas (38,347 bytes)


2006-03-25 00:11

reporter   ~0008724

I just uploaded the fix. I don't have CVS access, so I can't put it there.

Change was simple:
procedure TJvCustomValidateEdit.SetCheckChars(const NewValue: string);
  if (csLoading in ComponentState) or
     ((FDisplayFormat in [dfNone, dfCheckChars, dfNonCheckChars]) and
      (FCheckChars <> NewValue)) then
    FCheckChars := NewValue;
    EditText := MakeValid(FEditText);


2006-03-25 12:45

developer   ~0008725

Now in CVS.

Issue History

Date Modified Username Field Change
2006-03-17 03:47 delphi New Issue
2006-03-24 16:46 tbolick Note Added: 0008723
2006-03-25 00:10 tbolick File Added: JvValidateEdit.pas
2006-03-25 00:11 tbolick Note Added: 0008724
2006-03-25 12:45 elahn Status new => resolved
2006-03-25 12:45 elahn Resolution open => fixed
2006-03-25 12:45 elahn Assigned To => elahn
2006-03-25 12:45 elahn Note Added: 0008725