* fix: Return Default value by TRegIniFile.ReadXXX methods if requested registry value does not exist.

git-svn-id: trunk@7242 -
This commit is contained in:
yury 2007-05-02 11:54:28 +00:00
parent 73f3b5163a
commit 7f6dec9db4

View File

@ -104,6 +104,7 @@ begin
Result := Default; Result := Default;
if not OpenKey(fPath+Section,false) then Exit; if not OpenKey(fPath+Section,false) then Exit;
try try
if ValueExists(Ident) then
Result := inherited ReadBool(Ident); Result := inherited ReadBool(Ident);
finally finally
CloseKey; CloseKey;
@ -115,6 +116,7 @@ begin
Result := Default; Result := Default;
if not OpenKey(fPath+Section,false) then Exit; if not OpenKey(fPath+Section,false) then Exit;
try try
if ValueExists(Ident) then
Result := inherited ReadInteger(Ident); Result := inherited ReadInteger(Ident);
finally finally
CloseKey; CloseKey;
@ -126,6 +128,7 @@ begin
Result := Default; Result := Default;
if not OpenKey(fPath+Section,false) then Exit; if not OpenKey(fPath+Section,false) then Exit;
try try
if ValueExists(Ident) then
Result := inherited ReadString(Ident); Result := inherited ReadString(Ident);
finally finally
CloseKey; CloseKey;