From: <pe...@us...> - 2007-10-30 22:16:33
|
Revision: 11550 http://jvcl.svn.sourceforge.net/jvcl/?rev=11550&view=rev Author: peter3 Date: 2007-10-30 15:16:29 -0700 (Tue, 30 Oct 2007) Log Message: ----------- - changes to support DB controls in validators - wrong property name registered for TJvPropertyToCompareProperty resulting in no design editor for this property Modified Paths: -------------- trunk/jvcl/design/JvValidatorsEditorForm.pas trunk/jvcl/design/JvValidatorsReg.pas Modified: trunk/jvcl/design/JvValidatorsEditorForm.pas =================================================================== --- trunk/jvcl/design/JvValidatorsEditorForm.pas 2007-10-30 22:04:47 UTC (rev 11549) +++ trunk/jvcl/design/JvValidatorsEditorForm.pas 2007-10-30 22:16:29 UTC (rev 11550) @@ -557,10 +557,12 @@ PropInfo: PPropInfo; I, J: Integer; C: TControl; + V:TJvBaseValidator; begin if not (GetComponent(0) is TJvBaseValidator) then Exit; - C := TJvBaseValidator(GetComponent(0)).ControlToValidate; + V := TJvBaseValidator(GetComponent(0)); + C := V.ControlToValidate; if C = nil then Exit; J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, nil); @@ -570,6 +572,8 @@ J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, PropList); if J > 0 then try + if V.GetDataLink(C) <> nil then + Proc(cValidatorsDBValue); for I := 0 to J - 1 do begin PropInfo := PropList^[I]; @@ -629,10 +633,12 @@ PropInfo: PPropInfo; I, J: Integer; C: TControl; + V:TJvControlsCompareValidator; begin if not (GetComponent(0) is TJvControlsCompareValidator) then Exit; - C := TJvControlsCompareValidator(GetComponent(0)).CompareToControl; + V := TJvControlsCompareValidator(GetComponent(0)); + C := V.CompareToControl; if C = nil then Exit; J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, nil); @@ -642,6 +648,10 @@ J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, PropList); if J > 0 then try + + if V.GetDataLink(C) <> nil then + Proc(cValidatorsDBValue); + for I := 0 to J - 1 do begin PropInfo := PropList^[I]; Modified: trunk/jvcl/design/JvValidatorsReg.pas =================================================================== --- trunk/jvcl/design/JvValidatorsReg.pas 2007-10-30 22:04:47 UTC (rev 11549) +++ trunk/jvcl/design/JvValidatorsReg.pas 2007-10-30 22:16:29 UTC (rev 11550) @@ -59,7 +59,7 @@ RegisterPropertyEditor(TypeInfo(string), TJvBaseValidator, 'PropertyToValidate', TJvPropertyValidateProperty); RegisterPropertyEditor(TypeInfo(string), TJvBaseValidator, - 'PropertyToCompare', TJvPropertyToCompareProperty); + 'CompareToProperty', TJvPropertyToCompareProperty); {$IFDEF COMPILER5} RegisterPropertyEditor(TypeInfo(TComponent), TComponent, 'ValidationSummary', TJvValidationSummaryProperty); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |