Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003587 [JEDI VCL] 00 JVCL Components minor always 2006-03-17 03:47 2006-03-25 12:45
Reporter delphi View Status public  
Assigned To elahn
Priority normal Resolution fixed  
Status resolved   Product Version 3.10
Summary 0003587: TJvValidateEdit: doesn't validate if set at design time (dtCheckChars)
Description Hi

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,.-\|/';
Additional Information
Tags No tags attached.
Attached Files ? file icon JvValidateEdit.pas [^] (38,347 bytes) 2006-03-25 00:10

- Relationships

-  Notes
(0008723)
tbolick (reporter)
2006-03-24 16:46

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);
begin
  if (FDisplayFormat in [dfNone, dfCheckChars, dfNonCheckChars]) and
    (FCheckChars <> NewValue) then
  begin
    FCheckChars := NewValue;
    EditText := MakeValid(FEditText);
  end;
end;
(0008724)
tbolick (reporter)
2006-03-25 00:11

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);
begin
  if (csLoading in ComponentState) or
     ((FDisplayFormat in [dfNone, dfCheckChars, dfNonCheckChars]) and
      (FCheckChars <> NewValue)) then
  begin
    FCheckChars := NewValue;
    EditText := MakeValid(FEditText);
  end;
end;
(0008725)
elahn (developer)
2006-03-25 12:45

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-24 16:47 tbolick Issue Monitored: tbolick
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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker