RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDataModule.OldCreateOrder Property

Specifies when OnCreate and OnDestroy events occur.

Pascal
property OldCreateOrder: Boolean;
C++
__property Boolean OldCreateOrder;

When OldCreateOrder is false (the default) the OnCreate event occurs after all constructors are finished (from the AfterConstruction method) and the OnDestroy event occurs before any destructors are called (from the BeforeDestruction method). 

When OldCreateOrder is true, OnCreate is triggered from the data module constructor and OnDestroy from the data module destructor.

Note: This timing differs from Delphi version 3 and previous and from C++Builder version 1, where the OnCreate event occurred when the TDataModule constructor executed and the OnDestroy event occurred when the TDataModule destructor executed. Applications that require the OnCreate event and OnDestroy events to occur from the constructor and destructor of the data module can set OldCreateOrder to true.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!