View Issue Details

IDProjectCategoryView StatusLast Update
0004189JEDI VCL00 JVCL Componentspublic2007-08-06 06:41
ReportermcarroAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.30 
Target VersionFixed in Version3.34 
Summary0004189: tjvupdown fails when setting min/max
DescriptionSetting min and max produces confusing effects because the Borland's ancestor (TCustomUpDown) has its own (private) copies of the member variables FMin and FMax that are not updated by the SetMin and SetMax methods in TJvCustomUpDown.

The problem shows (among other cases) when setting Min/Max to a value lower/greater than the default. For example after setting Max to 1000 (the default is 100) the Direction parameter of the OnChangingEx event will take the value updNone instead of updUp as it should when Position is between 100 and 999, etc.
Additional InformationTo solve the probleam SetMin and SetMax must update the ancestor properties before doing any processing, as in:

--- JvUpDown.pas 2007-07-29 11:36:38.493931200 -0300
+++ new\JvUpDown.pas 2007-07-29 11:22:12.000000000 -0300
@@ -257,6 +257,7 @@
 
 procedure TJvCustomUpDown.SetMax(const Value: Integer);
 begin
+ inherited Max := Value;
   if Value <> FMax then
   begin
     FMax := Value;
@@ -267,6 +268,7 @@
 
 procedure TJvCustomUpDown.SetMin(const Value: Integer);
 begin
+ inherited Min := Value;
   if Value <> FMin then
   begin
     FMin := Value;
TagsNo tags attached.

Activities

obones

2007-08-06 06:41

administrator   ~0013613

This is now fixed in SVN

Issue History

Date Modified Username Field Change
2007-07-29 09:26 mcarro New Issue
2007-08-06 06:41 obones Status new => resolved
2007-08-06 06:41 obones Fixed in Version => Daily / SVN
2007-08-06 06:41 obones Resolution open => fixed
2007-08-06 06:41 obones Assigned To => obones
2007-08-06 06:41 obones Note Added: 0013613