mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-18 01:59:39 +01:00
* Introduce reload method
git-svn-id: trunk@30260 -
This commit is contained in:
parent
1ea195aefe
commit
636fb64577
@ -73,6 +73,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
Procedure Reload;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
procedure Flush; // Writes the JSON file
|
procedure Flush; // Writes the JSON file
|
||||||
procedure OpenKey(const aPath: WideString; AllowCreate : Boolean);
|
procedure OpenKey(const aPath: WideString; AllowCreate : Boolean);
|
||||||
@ -528,11 +529,16 @@ begin
|
|||||||
DeletePath(APath);
|
DeletePath(APath);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Procedure TJSONConfig.Reload;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Length(Filename) > 0 then
|
||||||
|
DoSetFilename(Filename,True);
|
||||||
|
end;
|
||||||
procedure TJSONConfig.Loaded;
|
procedure TJSONConfig.Loaded;
|
||||||
begin
|
begin
|
||||||
inherited Loaded;
|
inherited Loaded;
|
||||||
if Length(Filename) > 0 then
|
Reload;
|
||||||
DoSetFilename(Filename,True);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TJSONConfig.FindPath(const APath: WideString; AllowCreate: Boolean
|
function TJSONConfig.FindPath(const APath: WideString; AllowCreate: Boolean
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user