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
0001684 [JEDI VCL] 00 JVCL Components minor always 2004-04-22 17:18 2004-04-22 23:48
Reporter nestor View Status public  
Assigned To user72
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0001684: TJvValidateEdit OnValueChanged does not notify
Description TJvValidateEdit does not notify changed value

TJvCustomValidateEdit.OnValueChanged does not notify the new value of the component
Suggestion:
In TJvCustomValidateEdit (JvValidateEdit unit)
Remove all EnterText assignment from code
Remove all DoValueChanged call from code
Change DoValueChanged procedure to
procedure TJvCustomValidateEdit.DoValueChanged;
begin
  if Assigned(FOnValueChanged) and (EnterText <> FEditText) then
    FOnValueChanged(Self);
  EnterText := FEditText;
end;

Add “DoValueChanged” At the end of “SetEditText“ before or after DisplayText;
Remove ChangeText(FEditText) from “SetEditText”, DisplayText call this procedure.

Other suggestions:

In "KeyDown" procedure, the instruction (if Key = VK_DELETE then EditText:= MakeValid(inherited Text);) produce an unexpected behavior at run time.
I suggest you removing it and adding the management of the Escape key to restore last validate value:

procedure TJvCustomValidateEdit.KeyDown(var Key: Word; Shift: TShiftState);
begin
// if Key = VK_DELETE then EditText := MakeValid(inherited Text);
  if Key = VK_Escape then
  begin
    Key := 0;
    EditText := EnterText;
    SelStart := 0;
    SelLength := length(FEditText);
  end;
  inherited KeyDown(Key, Shift);
end;

Regards

Additional Information I project to define my own inherited TjvValidateEdit component. For that I need "IsValidChar" and "MakeValid" to be declared virtual and to be moved towards the protected section. Is it possible?
Tags No tags attached.
Attached Files ? file icon JvValidateEditUpd.pas [^] (34,022 bytes) 2004-04-22 17:19

- Relationships

-  Notes
(0004022)
user72
2004-04-22 23:48

Updated in CVS verbatim. Thanks for the fixes!

- Issue History
Date Modified Username Field Change
2004-04-22 17:18 nestor New Issue
2004-04-22 17:18 nestor Issue Monitored: nestor
2004-04-22 17:19 nestor File Added: JvValidateEditUpd.pas
2004-04-22 23:48 user72 Status new => resolved
2004-04-22 23:48 user72 Resolution open => fixed
2004-04-22 23:48 user72 Assigned To => user72
2004-04-22 23:48 user72 Note Added: 0004022
2004-04-23 09:14 nestor Issue End Monitor: nestor


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