Sign in Join
FPDoc Onlineexperiment

TStream.ReadComponent function

Member of TStreampublicIn unit Classes

Reads component data from a stream.

Declaration

pascal
function ReadComponent(Instance: TComponent): TComponent

Description

ReadComponent reads a component state from the stream and transfers this state to Instance. If Instance is nil, then it is created first based on the type stored in the stream. ReadComponent returns the component as it is read from the stream.

ReadComponent simply creates a TReader object and calls its ReadRootComponent method.

Errors

If an error occurs during the reading of the component, an EFilerError exception is raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.