TFieldDef.CreateField function
Create
TField instance based on definitions in current
TFieldDef instance.
Declaration
function CreateField(AOwner: TComponent; ParentField: TObjectField=Nil;
const FieldName: string='';
CreateChildren: Boolean=True) : TFieldArguments
AOwner | Owner for the new
|
ParentField | |
FieldName | |
CreateChildren |
Function result
Instance of TField corresponding to the field definition.
Description
CreateField determines, based on the
DataType what
TField descendent it
should create, and then returns a newly created instance of this class. It sets the appropriate defaults for the
Size,
FieldName,
FieldNo,
Precision,
ReadOnly and
Required properties of the newly created instance.
It should never be necessary to use this call in an end-user program, only
TDataset descendent classes should use this call.
The newly created field is owned by the component instance passed in the AOwner parameter.
The DefaultFieldClasses array is used to determine which TField Descendent class should be used when creating the TField instance, but descendents of TDataset may override the values in that array.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
