Delphi – Does Delphi sometimes revert text form files (DFM) to binary format

binarydelphidfmforms

Our Delphi 7 development team stores form files (dfm) in text mode, and uses a source control system (Subversion) to track changes.

Sometimes, we noticed that a form file returned to binary format between revisions, causing diff tools like TortoiseMerge to complain.

Using the Subversion change log, I can see that the DFM file was stored in text form before. The software developers never change the storage file format back to binary manually.

Have you encountered the same? Is it a known problem?

Best Answer

This does happen in Delphi 7 but is fixed in later versions. Usually you access forms in the IDE by opening the .pas file and then switching to the Form View. Right click your form and it will show that it is "Text DFM" ticked if you have done this before.

You will experience the problem you have described of a text DFM switching to a binary DFM when in the Delphi 7 IDE you open the .dfm file directly. eg. File->Open->Somefile.dfm .. Right click the dfm and choose "View as Form". Now right click the form, you will see that the "Text DFM" is unticked.

We were getting the problem when we opened up a DFM which was a grep search result. It had us perplexed also, and would cause corruption of the dfm in cvs as it was checked in as text.

Related Topic