Sign in Join
FPDoc Onlineexperiment

TDataModule class

In unit Classes

Container for non-visual components.

Declaration

pascal
TDataModule = class(TComponent)

Inheritance

  1. TDataModule
  2. TComponent
  3. TPersistent
  4. TObject

Descends from it: TCustomDaemon TCustomHTTPModule

Description

TDataModule is a container for non-visual objects which can be used in an IDE to group non-visual objects which can be used by various other containers (forms) in a project. Notably, data access components are typically stored on a datamodule. Web components and services can also be implemented as descendants of datamodules.

TDataModule introduces some events which make it easier to program, and provides the needed streaming capabilities for persistent storage.

An IDE will typically allow to create a descendant of TDataModule which contains non-visual components in it's published property list.

See also

Properties

DesignOffsetpublicPosition property needed for manipulation in an IDE.
DesignSizepublicSize property needed for manipulation in an IDE.
DesignPPIpublicDesign Time PPI.
OldCreateOrderpublishedDetermines when OnCreate and OnDestroy are triggered.

Methods

DoCreateprotected
DoDestroyprotected
DefinePropertiesprotectedDefines fake top,left properties for handling in the IDE.
GetChildrenprotectedMust be overridden by descendants to return all child components that must be streamed.
HandleCreateExceptionprotected
ReadStateprotectedRead the component's state from a stream.
CreatepublicCreate a new instance of a TDataModule.
CreateNewpublic
DestroypublicDestroys the TDataModule instance.
AfterConstructionpublicOverrides standard TObject behaviour.
BeforeDestructionpublicOverrides standard BeforeDestruction.

Events

OnCreatepublishedEvent handler, called when the datamodule is created.
OnDestroypublishedEvent handler, called when the datamodule is destroyed.

Inherited

From TComponent (70)

_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (36)

CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

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