Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ctr Space in delphi

Tags:

delphi

In a Delphi Project CTRL + Space not working. Before "uses" when I Press CTRL + Space the code completion is appeared but after "uses" does not appear. I use Delphi 2009. I install Fastreport and raize components and vcl Skin.

like image 930
AComputer Avatar asked Jul 18 '26 11:07

AComputer


2 Answers

The most probable cause for your problem is that you have some smal syntactical error like missing semicolom, invalid name, etc. somewhere between the point where CTRL+Space works and where no longer works. This is due the way how Code Insight is checking the code structure.

So I recomend you go to menu Project and then chose Syntax Check.

Another cause for CTRL+Space not working is that your are still debuging your program. Do nte that while debugging sesion is in progress both Code Insight and Error Insight are disabled.

like image 52
SilverWarior Avatar answered Jul 20 '26 07:07

SilverWarior


Something that in general wreaks havoc with Code Insight (Ctrl+Space) is conditional compilation.
So watch out for {$IFDEF ...} in your code.

I prefer to avoid conditional compilation in anything except library code that needs to support multiple Delphi versions. However, if you must use it, consider inverting the logic so you can use {$IFNDEF ...}.

Also, the feature doesn't always work if your code cannot compile. This depends on what dependencies are unable to compile at the point where you press Ctrl+Space.

However, in my experience the feature does sometimes just "break". If you're lucky closing and re-opening the project fixes it. But usually I have to close and re-open Delphi and do a full rebuild of the project.

like image 38
Disillusioned Avatar answered Jul 20 '26 07:07

Disillusioned