Three components working together:
* CompA, a descendant of TComponent, a mastermind component that knows a lot of things and binds things together
* CompB, a descendant of TComponent, runs some data from it CompA and compresses it. Can, among other things, combine CompC with data for presentation
- Has a published property of type CompA
* CompC, a descendant of TComponent descendants, a TFrame descendant drawing surface that can be set at design time to use CompB as a data provider
- Has a published property of type CompA
- Has a published property of type CompB
I think I remember what I read, although I cannot indicate where this Delphi stream engine reads all components from .dfm and builds a dependency graph. This graph is then used to create all components in the correct order. For the listed components, first there must be CompA (since it does not use any of the others), then CompB (it uses CompA and must be created after), and finally CompC, because it has the properties of both other types of components.
This is not happening. CompC is created before CompB. If I reorder the order in the .dfm file using a text editor, it works. Property values are not used in any constructors, only in Loaded procedures. But should there really be a way to make it work regardless of the order of the components in dfm?
, , - , .