View Issue Details

IDProjectCategoryView StatusLast Update
0005345JEDI VCL00 JVCL Componentspublic2012-02-29 16:53
ReporterSGlienkeAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.40 
Target VersionFixed in Version3.45 
Summary0005345: TJvControlsCompareValidator loses CompareToProperty after loading from dfm
DescriptionIf you define a TJvControlsCompareValidator during designtime it loses the CompareToProperty value at runtime or when you switch to viewing dfm as text and back.

Reason is a missing "if not (csLoading in ComponentState) then" in line 689 of JvValidators.pas.
TagsNo tags attached.

Activities

obones

2010-10-08 16:40

administrator   ~0017842

Please provide the zipped sources of a sample application showing this

2010-10-09 14:54

 

Issue5345.zip (1,300 bytes)

SGlienke

2010-10-09 14:54

reporter   ~0017850

Look at the dfm File. You see that the properties for the TJvControlsCompareValidator are set correctly. When you open the project you notice the value for the property CompareToProperty is empty. Thats because of the missing line in the JvValidators.pas

obones

2010-11-09 14:55

administrator   ~0018057

I'm seeing it indeed.
If I understand you correctly, the code before the fix looks like this:

    if FCompareToControl <> nil then
    begin
      if Supports(FCompareToControl, IJvValidationProperty, Obj) then
        CompareToProperty := Obj.GetValidationPropertyName
      else
        CompareToProperty := '';
    end;


And with the fix, it looks like this:

    if FCompareToControl <> nil then
    begin
      if not (csLoading in ComponentState) then
        if Supports(FCompareToControl, IJvValidationProperty, Obj) then
          CompareToProperty := Obj.GetValidationPropertyName
        else
          CompareToProperty := '';
    end;

Is that right?

SGlienke

2010-11-09 14:56

reporter   ~0018058

Exactly

obones

2010-11-09 15:12

administrator   ~0018061

Thanks, this is now in SVN

Issue History

Date Modified Username Field Change
2010-09-30 17:10 SGlienke New Issue
2010-10-08 16:40 obones Note Added: 0017842
2010-10-08 16:40 obones Status new => feedback
2010-10-09 14:54 SGlienke File Added: Issue5345.zip
2010-10-09 14:54 SGlienke Note Added: 0017850
2010-11-09 14:55 obones Note Added: 0018057
2010-11-09 14:56 SGlienke Note Added: 0018058
2010-11-09 15:12 obones Note Added: 0018061
2010-11-09 15:12 obones Status feedback => resolved
2010-11-09 15:12 obones Fixed in Version => Daily / SVN
2010-11-09 15:12 obones Resolution open => fixed
2010-11-09 15:12 obones Assigned To => obones
2012-02-29 16:53 obones Fixed in Version Daily / SVN => 3.45