Reputation: 4191
I am working through legacy code with over 500 forms in multiple directories. I need to find any TDataset descendent with the Tag property not set.
If I was looking for Tag being set to a particualr value, it would be in the dfm and I could search for it. In this case the Tag property will be missing from the dfm.
My best poroposal so far is to write another program that loads all the forms one at a time. In the loaded event it can check the components and the property. It is too much work to add them all manually to the project, fix the uses clause and create each one by its type. Even if I were to do this, there is no way to ensure that I did not miss a form. Also some forms have the same name as others (they are in different folders and are muutually exclusive).
Question
I would like to scan the folders for the dfm files and load the forms just from the dfm file. Is this even sensible or possible ? If so then how do I programatically load/create a form just from the dfm ?
Upvotes: 1
Views: 389
Reputation: 612804
I would like to scan the folders for the dfm files and load the forms just from the dfm file. Is this even sensible or possible?
No this is not possible. You cannot create an instance of a form without the class that defines the form. A dfm file is not enough.
Upvotes: 1