The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,225 other subscribers

Porting to Delphi XE2: Delphi XE2 Unit scope names not always right

Posted by jpluimers on 2013/03/21

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

2 Responses to “Porting to Delphi XE2: Delphi XE2 Unit scope names not always right”

  1. Come on now. Are you sure some apps still store local data using the BDE?

    Actually, local db data is *sure* to be making a come back. We have such large volumes of data now. It will take more than just a simple *single* data file approach to provide customers with the client side features that they want.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: