Archive for March, 2012

Delphi Class Completion (Ctl-Shft-C) Stops Working

Sunday, March 18th, 2012

Suddenly, pressing Ctl-Shft-C in the Delphi XE2 IDE stopped working.  You could press that magic key combination all day and nothing would happen.  It took hours to figure out what the problem was.

I had installed update 4 for Delphi XE2, which contained, among other things, something called AQTime.  This appears to be some kind of application profiler.  Anyway, it was AQTime that was interfering with class completion.  A quick trip to Control Panel to uninstall the offending bit of software and everything went back to normal.

Never build package %s must be recompiled

Sunday, March 18th, 2012

I was recompiling my application they other day, switching everything from Debug to Release.  Suddenly I started getting “Never build package %s must be recompiled” errors.  I couldn’t understand this, since the previous step in the recompile had just finished compiling the package in question.

It finally turned out to be caused by recompiling the Release packages into a different directory than the Debug packages.  The Debug packages went into Delphi’s default DCP and BPL directories while the Release packages went into the projects ($Platform)\($Config) directory.  I did this because the packages in question contain Delphi components that appear in the component toolbar and I want to be able to step into the source for those packages while debugging.  I thought that compiling the Release packages to a different directory would solve all kinds of problems related to debugging.   And it did, but it created these errors when compiling for Release.  It was the order of directories on Delphi’s search path that caused the problem.  The Delphi wide options specify the default package directory early on in the search path.  Even though I had the Release directory on the project’s search path, the Release DCPs were never found, because the Debug DCPs were found first.  Since I was compiling the Release packages to ..\$(Platform)\($Config) all I had to do was add that to the Delphi wide search path before the default DCP directory and the problem was solved.