Sometimes, Delphi XE2 gets confused after converting an old Delphi project because the Unit scope names are not correct. When creating a new Delphi XE2 application, the Unit scope names are as follows:
- System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell
This means that if you don’t prepend a unit with a Unit scope prefix, Delphi will automatically try the list above. The thing is: when importing a Delphi project from an old Delphi version, the Unit scope names are somehow “guessed”, and not always complete:
- System;Xml;Data;Datasnap;Web;Soap;Winapi
This means it cannot resolve the right name for the VCL units like Controls or Forms, and you get a nice compiler error: But with the default, it cannot resolve the Windows and other units in the Winapi scope. So the list I normally use is one of these:
- System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;Winapi;System.Win
- System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;Winapi;System.Win;Bde
(Yes, some apps still store Paradox data locally and use the BDE)
–jeroen
Filed under: Delphi, Delphi XE2, Delphi XE3, Development, Software Development