3

When I mouse over the UnitNames within the Uses clause a window pops up showing the UnitName Namespace. For example when I mouseover the SysUtils unit I see SysUtils Namspace in a popup window. If I right-click on SysUtils and choose Open File at Cursor the source code opens in the IDE.

If I right-click and choose Open File at Cursor on some of the other untis I am presented with an Open File dialog box.

How come all the units don't simply just open into the IDE?

1 Answers1

6

This happens when the source (.pas) file isn't on the current Search or Browsing path.

You can usually fix it by simply adding the unit to the project (right-click project in Project Manager, choose 'Add', navigate to the file, and double-click. This adds it to the .dpr file and makes it readily available to the IDE.

You can also add it to the paths using Project->Options->Delphi Compiler->Search Path or Tools->Options->Environment Options->Delphi Options->Library->Browsing Path.

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • +1 another situation is when the IDE is running for too long(no restart in a few days) –  May 07 '12 at 22:49