Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Bob Swart (aka Drs.Bob) Dr.Bob's Delphi Clinics Dr.Bob's Delphi Courseware Manuals
View Bob Swart's profile on LinkedIn Drs.Bob's Delphi Notes
These are the voyages using Delphi Enterprise (and Architect). Its mission: to explore strange, new worlds. To design and build new applications. To boldly go...

Delphi / RAD Studio XE2 Unit Scope Helper

Author: Bob Swart
Posted: 9/4/2011 5:03:15 PM (GMT+1)

Delphi XE2 introduces unit scope names, which means that a unit name gets a prefix in the RTL, VCL and FMX libraries.
Since it's not always immediately obvious which of the 31 Delphi XE2 unit scope names should be used to prefix a given unit, I've written a little web application that may help in turning an original unit name into a scoped unit name (like SysUtils turning into System.SysUtils). You can try the WebBroker application below, or call it directly from where the ??? hold the unit name you want to be "scoped".




Bob Swart 11/09/04 17:14:13If you leave comments on this post, the content of the post itself will disappear on screen (an issue with having three "forms", mixing ASP.NET and CGI and back to ASP.NET, but then without ViewState ;-)).
Bob Swart 11/09/04 17:21:18I also plan to add third-party scoped unit names (for example for Raize Software, TMS Software, Developer Express) - feel free to let me know third-party libraries and their relevant unit scope names so I can add these as well. Thanks in advance!
david berneda 11/09/04 19:55:15Hi Bob ! VCL TChart unit naming is identical, just the prefix in-front of each unit. For FMX the prefix is FMXTee but the unit names are different than VCL (ie. FMXTee.Engine is VCLTee.TeEngine) For FMI/iOS there is no prefix, "." dots are just converted to "_" underscores (ie: FMXTee_Engine.pas) regards david
Bob Swart 11/09/04 20:37:08Do you have a list of TChart units for VCL and FMX that belong to the unit scopes? (e-mail is fine, thanks).
Ralf 11/09/04 23:14:59Why the effort? XE2 is working with "old" styled unit names too.
Bob Swart 11/09/04 23:49:04Only if you make sure to tell the Delphi Compiler in the Project Options what all available Unit Scope Names are... And since the unit scope names are "the way" from now on, I'd rather write them in full (unless you need/want uses clauses that can be used with previous versions of Delphi, of course)...
Bob Swart 11/09/04 23:49:17Besides, it was fun to do ;-)
Colin J 11/09/05 04:45:30If you plan to move everything to XE2 and don't need to support previous versions of Delphi then unit scoping is fine but otherwise you may need to hold back for the moment.
Daniel DeLuca 11/11/08 18:29:22Not finding the replacement for TMarksTipTool
Bob Swart 11/11/08 19:01:14Sounds like a third-party unit for which I haven't heard the new scoped unit name ;-)
Daniel DeLuca 11/11/08 19:08:17Not finding the replacement for TMarksTipTool
Roger Dunn 12/06/27 23:59:37The tool is cool, but what I'd like this tool to do is take a copy of my whole uses clause and spit back the new scoped uses clause. For instance, if I copy and paste this into your web service: uses Windows, Messages, SysUtils, Graphics;, I'd like to get this: uses WinApi.Windows, WinApi.Messages, System.SysUtils, Vcl.Graphics; Possible?
handbags 12/12/04 19:37:18I am glad to be a visitant of this consummate internet site ! , thanks for this rare data! . handbags
Awan 13/09/05 13:52:37That's more than seelibsn! That's a great post!

New Comment (max. 2048 characters, no HTML):


This webpage © 2005-2017 by Bob Swart (aka Dr.Bob - All Rights Reserved.