Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi XE shows at least 200 errors but the program compiles just fine

My brand new Delphi XE shows hundreds of errors in 'Structure' panel. It shows errors like 'Undeclared FileExists at line 130' or 'Undeclared Create at line 242'. Even if it shows those errors, the program compiles just fine.

I also see that code insight is not always working. When I move the cursor over a variable, the cursor starts to flicker and no pop-up appears. Other times, it just highlight some units in red and it says the it cannot find them.

There are tricks to fix all these issues?


Update/Pseudo-fix:
I have found that restarting the IDE helps for a while.
I really help that one day Embarcadero will release Delphi ST (from STable).
:)

like image 890
Server Overflow Avatar asked May 20 '11 20:05

Server Overflow


2 Answers

Yeah, CodeInsight and ErrorInsight are known to have lots of problems. They've gotten a bit better each version for a while now, but there's still a lot to be done. Andreas Hausladen, who's probably the smartest guy in the Delphi community, has done a lot of poking around in the IDE internals, and he says they have race condition-based bugs that probably can't be fixed without a total rewrite.

If these fake errors are giving you trouble, you can probably disable them, as Ken mentioned in his comment.

like image 146
Mason Wheeler Avatar answered Sep 17 '22 15:09

Mason Wheeler


For me it usually helps to close the project and re-open it; the structure errors disappear.

like image 31
Ondrej Kelle Avatar answered Sep 18 '22 15:09

Ondrej Kelle