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
0003149 [JEDI VCL] 00 JVCL Components feature always 2005-08-11 01:24 2005-10-02 06:56
Reporter elahn View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003149: TJvValidateEdit -> AllowEmpty property added
Description The existing behaviour if an "empty" state is desired, is to set the ZeroEmpty property, which displays '' when the Value = 0. This doesn't allow for a distinction in state between "empty" and "value of 0 has been entered".

An AllowEmpty property allows Text/EditText = '', while the Value/AsInteger/AsCurrency properties return a value of 0 exactly as they would if the ZeroEmpty property were set.
Additional Information Implementation:

In TJvCustomValidateEdit, protected:
    property AllowEmpty: Boolean read FAllowEmpty write FAllowEmpty;

At the start of TJvCustomValidateEdit.DisplayText
    if FAllowEmpty and (FEditText = '') then
      ChangeText('')
    else

Modified Property: TJvCustomValidateEdit.Value

I've added the " stored False" specifier for the Value property because Text & EditText are both being stored and storing Value as well only serves to cause validation to occur twice when loading the control. Also, when Value is stored, AllowEmpty is set and Text = '' at design time, when the program is run Value is loaded and Text is set to '0'.

In TJvValidateEdit, published:
    property AllowEmpty default False;

Side Note: I would much prefer to have AllowEmpty default True, but it is possible for that to break existing behaviour. :( If everyone is happy with default True and a release note on the next JVCL release telling people to be aware of it, then that'd be great! Otherwise, I'll deal with changing the AllowEmpty property each time I drop a new one on a form.
Tags No tags attached.
Attached Files ? file icon JvValidateEdit.pas [^] (35,491 bytes) 2005-08-11 01:24
zip file icon JvValidateEdit.pas_To_Replace_CVS_v1.37.zip [^] (7,203 bytes) 2005-09-15 22:49
zip file icon JvValidateEdit.pas_To_Replace_CVS_v1.37_(no_comments).zip [^] (7,154 bytes) 2005-09-28 20:57

- Relationships

-  Notes
(0007935)
elahn (developer)
2005-09-15 22:50

Changes integrated into latest version from CVS, JvValidateEdit.pas (v1.37).
(0007995)
obones (administrator)
2005-10-02 06:56

This is now in CVS.
Please, next time, ensure that the line endings are DOS type (0000013#10) instead of UNIX type.

- Issue History
Date Modified Username Field Change
2005-08-11 01:24 elahn New Issue
2005-08-11 01:24 elahn File Added: JvValidateEdit.pas
2005-08-11 01:27 elahn Issue Monitored: elahn
2005-09-15 22:49 elahn File Added: JvValidateEdit.pas_To_Replace_CVS_v1.37.zip
2005-09-15 22:50 elahn Note Added: 0007935
2005-09-28 20:57 elahn File Added: JvValidateEdit.pas_To_Replace_CVS_v1.37_(no_comments).zip
2005-10-02 06:56 obones Status new => resolved
2005-10-02 06:56 obones Resolution open => fixed
2005-10-02 06:56 obones Assigned To => obones
2005-10-02 06:56 obones Note Added: 0007995
2005-12-02 19:08 elahn Issue End Monitor: elahn


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