Cannot open .dfm files in IDE
My system configurations are a follows Delphi2010 on windows 7 professional. I have a problem with some of .dfm files in the project. I got it as follows. First of all I needed to change some datatypes of TOraQuery component fields from TStringField to TWideStringField and I started it doing manually like opening .dfm change one by one (Find-Replace) everyt开发者_如何学JAVAhing was fine later on because our project is huge I decided to change everything at once so by using Notepad++ editor and by using option Find in Files and replace all I did replacement. So after this operation I started getting this error like 'TWideStringF class not found' when I wanted to open particular .dfm file. I cannot open this .dfm files even if I press ignore. PS: Even when I try to open files that has errors in Notepad++ editor to get the line TWideStringF I cannot find it. How to solve this problem ? Can anyone give me a clue ? thank you.
Try finding the "TWideStringF" in ALL your source code first to know where the problem is comming, after that, well, all dependes on what you find!
The Delphi IDE need to be able to find the classes specified in the DFM. It creates instance of these on the design surface for you to interact with.
Editing a DFM by hand is a common practice. I do it often, as sometimes it is faster than any other method. However, it comes with a problem if the class or property can not be found it can cause the DFM not to load. So extra care must be taken to insure that manual edits done correctly.
In this case you can restore the file, and redo the search and replace, or to look at the instances where it's broken and fix them all by hand.
Search for: TWideStringF
I suspect you will find that is missing the remaining ield
required. Note: Searching in IDE will not work as it won't search DFM files.
精彩评论