Added: ValidateValue method
This commit is contained in:
parent
2caa82fc4a
commit
e19d798e51
@ -140,6 +140,11 @@ type
|
|||||||
|
|
||||||
//:$ Deletes the specified value.
|
//:$ Deletes the specified value.
|
||||||
procedure DeleteValue(const AName: String); virtual; abstract;
|
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;
|
end;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -425,6 +430,18 @@ begin
|
|||||||
end;
|
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
|
{===================== TX2SettingsFactory
|
||||||
Defines
|
Defines
|
||||||
========================================}
|
========================================}
|
||||||
|
Loading…
Reference in New Issue
Block a user