1
0
mirror of synced 2024-12-22 17:23:07 +01:00

Fixed: base key not applied correctly in registry settings

This commit is contained in:
Mark van Renswoude 2004-09-05 14:04:05 +00:00
parent 011897142c
commit 330ba47f5e
2 changed files with 11 additions and 9 deletions

View File

@ -206,16 +206,18 @@ begin
pDefine := FFactory.GetDefine(FSection, AName);
if not InternalReadBool(AName, Result) then
begin
if Assigned(pDefine) then
Result := pDefine.Value
else
raise EX2SettingsUndefined.CreateFmt(RSUndefined, [AName]);
raise EX2SettingsUndefined.CreateFmt(RSUndefined, [AName])
if Assigned(pDefine) then
begin
vValue := Result;
pDefine.Action(saRead, FSection, AName, vValue);
Result := vValue;
if Assigned(pDefine) then
begin
vValue := Result;
pDefine.Action(saRead, FSection, AName, vValue);
Result := vValue;
end;
end;
end;

View File

@ -53,7 +53,7 @@ type
procedure DeleteValue(const AName: String); override;
public
constructor CreateInit(const AFactory: TX2SettingsFactory;
const ASection: String;
const AKey, ASection: String;
const ARoot: Cardinal);
destructor Destroy(); override;
end;
@ -86,7 +86,7 @@ uses
========================================}
function TX2RegistrySettingsFactory.GetSection;
begin
Result := TX2RegistrySettings.CreateInit(Self, ASection, FRoot);
Result := TX2RegistrySettings.CreateInit(Self, FKey, ASection, FRoot);
end;
@ -100,7 +100,7 @@ begin
FData := TRegistry.Create();
FData.RootKey := ARoot;
FKey := IncludeTrailingPathDelimiter(FKey) +
FKey := IncludeTrailingPathDelimiter(AKey) +
StringReplace(ASection, '.', '\', [rfReplaceAll]);
end;