View Issue Details

IDProjectCategoryView StatusLast Update
0005425JEDI VCL00 JVCL Componentspublic2011-06-08 13:59
ReportersosingusAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version3.40 
Target VersionFixed in Version 
Summary0005425: TjvValidateEdit floatinf point values
DescriptionI have a problem using TjvValidateEdit for floating point values. Problem appears when I try to format float value using floating point format setting (%f, %g, %m).
Maybe there is a proper way of setting up this component that I'm not aware of?

Only format setting that doesn't produce an error is string (%s).

Other than that it seems component is storing entire number with decimals even if DecimalPlaces is set to 2, or 3 that I suppose should limit number of decimal places.

TagsNo tags attached.

Activities

jfudickar

2010-11-27 11:32

developer   ~0018170

Could you provide us with a small sample showing the problems.

2010-11-27 14:55

 

TestValidateEditWithFormat.zip (5,482 bytes)

sosingus

2010-11-27 15:06

reporter   ~0018180

I've attached sample. I get "Format <any but %s> invalid or incompatible with argument" in output... try typing in more than 2 decimals and format value as string to see it is storing more than limited.

obones

2011-06-08 13:59

administrator   ~0018664

Well, this is expected because TJvValidateEdit.Value is a variant. So when you pass it to the Format function it is implicitely cast to a string.
You don't have to do any case statement yourself, the Variant handles it for you.

Issue History

Date Modified Username Field Change
2010-11-26 13:46 sosingus New Issue
2010-11-27 11:32 jfudickar Note Added: 0018170
2010-11-27 11:32 jfudickar Status new => feedback
2010-11-27 14:55 sosingus File Added: TestValidateEditWithFormat.zip
2010-11-27 15:06 sosingus Note Added: 0018180
2011-06-07 17:32 obones Status feedback => acknowledged
2011-06-08 13:59 obones Note Added: 0018664
2011-06-08 13:59 obones Status acknowledged => resolved
2011-06-08 13:59 obones Resolution open => no change required
2011-06-08 13:59 obones Assigned To => obones