i dont have much time, i will try to get right to the point.
(This is all design-time, refreshing the DFM with alt+F12 2x)
Normally, i get this (What i want):
object Form1: TForm1
object Father: TFather
object Son: TSon
end
end
end
When i refresh the dfm, and the Delphi Reader runs… i get that:
object Form1: TForm1
object Father: TFather
end
object Son: TSon
end
end
Why the son get out of the father? I am setting Father the Owner of Son at the moment of Son’s creation.
I need to do something else? I also tried to override GetOwner of Son, but with no success.
Any ideas?
The information stored in the dfm is only what you design. The nesting is about parent/child relations, not about ownership. This dfm suggests that Son is no longer the Parent of Father. This may be caused by code in TSon that modifies it’s own parent.