I have a .BPG project which has a collection of .DPR project files.
- Opened a .PAS file
- I changed some line of code in a .PAS file of an project.
- Saved it
- After changing the source code, I tried COMPILE on that project.
- First it says "Compiled" successfully.
Now I see the same .PAS file, the changes were lost. Codes changed at step 2 was lost. It is having the previous code only.
The behavior is same for BUILD too. Anyone knows about this problem?
Thanks in advance.
Update
One more hint:
.DPR Project Name is XX.dll In IDE, there is one file with name XX_TLB.PAS in that project. In this file only I tried to change some code, which got reverted after compiling/building. Now I tried to rename this file, which gave me a error message
Type Libraries must have the tlb extention.
Also can the .DCU and .PAS files be in the same directory? I entered this directory (where both .PAS and .DCU files exist) into the directories list under "Tools->Options->Delphi Options->Library - Win32"
XX_TLB.PAS
files are protected files. Do not edit such files directly. In fact there is note on top of the file warning you from editing the file.They are regenerated each time the type library is refreshed.
See
Code Generated When You Import Type Library Information
.This refresh could be done by the IDE each time you compile/build your dll.
You will never edit this file because of the dependencies of a type library and registered com objects. Either you change the com object itself via the type library editor, or create a new unit that interacts with your ActiveX class.