Frames are great for isolating code, but nested frames and frame reuse has issues. What am I doing wrong?
The frames:
frmValidation –
a small toolbar with a message box and Save/Cancel buttons
frmDetailProperties – has a frmValidation embedded
frmMasterProperties – has a frmValidation embedded
frmDetailList has a list and the frmDetailProperties embedded
frmMasterList has a list and the frmMasterProperties and a frmDetailList embedded.
Initially, I had a problem with the frmValidation instances having the same name on the two properties forms – and Delphi complained about Duplicates not allowed. Renaming one, solved that issue.
All frames have been added to the palette, and when I have the project open, I have no problems with viewing the combined frames. The frame source is in the project path.
The problem: If I close Delphi and start again, Delphi complains that it can’t find the TfrmDetailProperties in frmMasterList. I click cancel, the project opens, but the frmMasterList can’t be viewed.
If I now close the frmMasterList unit – and reopen it, it opens without any messages, and the frame can now be correctly viewed.
What is going on here?
You must be logged in to post a comment.