Sign in Join
FPDoc Onlineexperiment

TScreen.FindNonDesignerDataModule function

Member of TScreenpublicIn unit Forms

Finds a data module with the specified name, excluding designer data modules.

Declaration

pascal
function FindNonDesignerDataModule(const DataModuleName: string)
: TDataModule

Arguments

DataModuleName

Name of the data module to locate in the method.

Function result

Data module with the specified name, or Nil.

Description

Visits the data module instances in the internal list, and compares the Name property for the TDataModule instances to the value in DataModuleName. CompareText text is called to perform a case-insensitive comparison for the values. TDataModule instances with csDesigning in the ComponentState property are ignored; these are design-time data modules used by the Lazarus IDE.

The return value contains the TDataModule instance with the name in DataModuleName, or Nil when the data module list is empty or the name in DataModuleName is not found in the list.

Used when an Application loads its components using the LCL streaming mechanism. Ignores the designer forms and data modules (where ComponentState contains csDesigning) handled by the Lazarus IDE.

See also

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