Writes the TPersistent object specified by Instance to a stream
Use the WritePersistent method when you want to write a defined property (specified by TFiler.DefineProperties method) that is a TPersistent to 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;