tpersistent

How can a Delphi TForm / TPersistent object calculate its own construction and deserialization time?

喜你入骨 提交于 2019-12-24 21:40:22
问题 For performance tests I need a way to measure the time needed for a form to load its definition from the DFM. All existing forms inherit a custom form class. To capture the current time, this base class needs overriden methods as "extension points": start of the deserialization process after the deserialization (can be implemented by overriding the Loaded procedure) the moment just before the execution of the OnFormCreate event So the log for TMyForm.Create(nil) could look like: - 00.000

Collection editor does not open for a TCollection property in a TPersistent property

一曲冷凌霜 提交于 2019-12-02 06:37:36
问题 I've got my custom collection property which is working great when it is a direct member of my component. But I want to move the collection property to a TPersistent propery within my component. And now comes the problem, it doesn't work: double clicking on the collection property in the object inspector normally opens the collection editor, but it does not anymore. Fist of all - what should I pass to the contructor of the TPersistent property? TMyCollection = class(TCollection) constructor