Can you recover from a "Resource 1 not found"? in Delphi 2010
A fairly complex project was muddling along with lots of work done last night when I decided to turn in. But thinking about adding some gestures got me up after three hours of sleep and I went at the code again, which was a mistake. I added the gesture manager and then sleepily hit the F1 key to look up the help on gestures. Coming back from THAT mistake, Delphi 2010 froze. I had compiled just before adding the gesture manager, so I presumed no big thing. I was wrong. When I used task manager to close down D2010, things didn't come back right. Lots of complaints about Nexus databases. Then, on compiling I through a fit about the res file. In and out of the IDE, renaming the res file and letting it be recreated. But on run, the program complains about "Resource 1 not found" and then proceeds to run, ignoring the INI file settings to place the form on the screen. Furthermore, it has the开发者_开发技巧 interesting side effect of making controls (NextSuite's FlipPanels) DISAPPEAR when clicked, instead of expanding the panel. All quite ... mind-blowing. My backup is about 21 hours old and I'd rather not lose the work done in the interim. Suggestions?
When I deleted and recreated the .RES file, Delphi didn't automatically default to turning on version information. A routine from one of the procedures in a closed routine was trying to read that resource and producing the 'very' informative error.
Lessons learned from this fiasco:
- Turning on version resource in the IDE does NOT survive the recreation of the resource file
- You have to have source code to all of your third party libraries.
Ahhh well, live and learn. Time and time again.
精彩评论