I’ve just had an epic derp moment…
I inherited a form, add a few new controls and the related scaffolding.
Then I thought – wow – it would be nice to have a generic type property on that form – so I added to the declaration of the inherited form, and used the type in a couple of non visual related methods. Saved, close the unit, instantiated the form elsewhere, using the appropriate T substitute.
The form shows up and goes BANG on the first new control reference in the code. It was nil. All the new controls were nil.
I open the new form – or rather I try: Parent not found – so I can’t open the form designer.
Turns out that adding a generic wasn’t such a good idea after all.
Interesting that it compiled, really – considering the visual inheritance was totally broken.
Edit: But it would have been super neat! 😛