From e19d798e517550b033043f3ba603fe7a584a78a1 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Sun, 26 Sep 2004 13:59:43 +0000 Subject: [PATCH] Added: ValidateValue method --- X2UtSettings.pas | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/X2UtSettings.pas b/X2UtSettings.pas index e1df1bb..b2f5da6 100644 --- a/X2UtSettings.pas +++ b/X2UtSettings.pas @@ -140,6 +140,11 @@ type //:$ Deletes the specified value. procedure DeleteValue(const AName: String); virtual; abstract; + + + //:$ Validates the specified value using the defined callback method + //:$ if present. + function ValidateValue(const AName: String; const AValue: Variant): Variant; end; { @@ -425,6 +430,18 @@ begin end; +function TX2Settings.ValidateValue; +var + pDefine: TX2SettingsDefine; + +begin + Result := AValue; + pDefine := FFactory.GetDefine(FSection, AName); + if Assigned(pDefine) then + pDefine.Action(saRead, FSection, AName, Result); +end; + + {===================== TX2SettingsFactory Defines ========================================}