Reads the TPersistent object specified by Instance from a stream
Use the ReadPersistent method when you want to read a defined property (specified by TFiler.DefineProperties method) that is a TPersistent from a stream
Namespace: FilerHelper
Delphi |
public |
Parameters
Instance
Type: TPersistent
To create a defined TPersistent property for your component, include the FilerHelper unit in your uses statement, and then override the protected DefineProperties method: Delphi |
TMyComponent = class(TComponent) |
Then, create your reader procedure and writer procedures:
Delphi
procedure TMyComponent.ReadMyProp(Reader: TReader);
begin
Reader.ReadPersistent(FMyProp);
end;
procedure TMyComponent.WriteMyProp(Writer: TWriter);
begin
Writer.WritePersistent(FMyProp);
end;