Statement: This article is a translation of borland company delphi7 online help. The copyright of the original text belongs to Borland Company and the copyright of the Chinese translation belongs to the author. This article can be reproduced without the author's authorization, but the author must be indicated and shall not be used for commercial purposes; for commercial purposes, please obtain authorization from the author. Contact information: [email protected]. If you think there is something wrong or inappropriate in the author's translation, or there is something wrong with the text proofreading, please email the author and the author will be grateful.
Author: fengzhengren (Kite)
Time: May 16, 2005
New features of Delphi7
1. Overview
Delphi7 has added new features or enhanced features in the following aspects:
IDE (Integrated Development Environment)
Web
COM
Database (database)
Component library (control library)
Runtime library
Compiler (compiler)
Rave Reports (Rava Report)
ModelMaker
Documentation
Note: Some features are not available to certain versions of Delphi.
2. IDE changes
The IDE has added new features in the following aspects:
2.1 Compiler information
The new View|Additional Message Info menu item can display a prompt message window, through which you can download and view information about the compiler from the Borland company's website.
The new PRoject|Options|Compiler Messages page gives you greater control over the situations in which compilation warnings are generated.
2.2 Control panel changes
Added the system page that appears only when opening the CLX application.
The new Indy Intercepts and Indy I/O Handlers pages offer open source network protocol controls (Pro and Enterprise Editions).
The new IW Standard, IW Data, IW Client Side and IW Control pages provide IntraWeb control development of web-based applications.
The new Rave page provides controls to add report generation functionality to the programs you develop.
If the control page can only display the remaining control icons through horizontal scrolling, the drop-down menu button will appear to list the remaining control icons.
2.3 Code prompts changes
Code prompts get faster and allows you to browse their declarations by using CTRL+ in the code prompt list.
New HTML code prompts automatically display valid HTML elements and attributes (Pro and Enterprise Editions) in the code editing window.
By using the OpenTools API, you can create a customized code prompt manager. For details, refer to the section "Extending the IDE".
Menu Item Tools|Editor Options|Code Insight page allows you to set color for the symbol display of the code prompt tool.
2.4 Debugger changes
The following changes have been made to view the list:
To simplify debugging, multi-tables allow you to put view objects into view groups. Add a view group, right-click the view list and select the Add Group option.
Add the view object name and value column. Whether to display the table header can be achieved by right-clicking the view list and selecting Show Column Headers.
Add a check box to control whether the view object is displayed.
The following new options are added to the menu item Tools|Debugger Options|Event Log page:
By setting the color of the event log, different event messages can be displayed in different colors.
Modules (exe, dll, ocx, etc.) automatically write message records in the event log when the compiled process is loaded or unloaded. Previously, whether these events are logged can be controlled by this option.
The Run Parameters dialog box adds a working directory option, allowing you to specify a folder name for the compilation process.
2.5 Other improvements
In Project Manager, you can compile some projects in the project group by right-clicking on the project group to select Make All from Here or Build All from Here.
3. Changes in WEB technology
Delphi has included the IntraWeb controls of AtoZed software. You can use IntraWeb's standard windowing tools to develop web server applications, and you can also use IntraWeb to develop web Broker and WebSnap web applications. For more information, please refer to "Create with IntraWeb". The web server application section. Delphi Enterprise Edition includes a complete IntraWeb product, and the Professional Edition includes a portion of IntraWeb product.
Delphi already supports Apache2 as Web Broker, WebSnap and SOAP object types.
Borland does not recommend using Win-CGI as the object type of web server applications and web services, but recommends using the regular CGI, ISAPI/NSAPI or Apache object types instead.
Web services have been strengthened as follows:
3.1 New UDDI browser
The new UDDI browser can locate and import WSDL documents based on the entire UDDI registration.
3.2 SOAP header
The new classes and interfaces allow you to read or insert header information to SOAP envelopes that transmit information on the server and client. For more information, please refer to "Defining and Using SOAP Headers" and "Processing SOAP Headers in Client Applications".
3.3 Attachment
Web service applications (including client and server applications) can already manipulate attachments. Attachment (a subclass of TSOAPAttachment) transmits information in SOAP encoding as part of various forms. When the application receives the attachment, it saves it in a temporary file and is provided for use by the application.
3.4 Type support
You can customize the exchange between remote classes and their SOAP requests by overloading the two newly added virtual methods ObjectToSOAP and SOAPToObject.
The exception object (EremotableException instance) that handles an exception that occurs when responding to a web service request contains more information about SOAP error packets.
When registering and calling interfaces, the type definition is automatically registered in the form of remote category registration.
TXSDecimal adds the AsBcd property to easily convert between xml and local types, and likewise, TXSHexBinary adds the AsByteArray property. The remote class describing the time value is now changed to seconds instead of milliseconds.
3.5 Other strengthening
New events added by THTTPReqResp allow you to intercept information before sending HTTP messages, and allow you to monitor progress when sending or receiving long messages.
The THTTPSoapPascalInvoker class publish event allows you to write code to execute before or after the caller executes the request.
Added control over mapping between the calling interface and the WSDL document. The TWSDLHTMLPublish class adds several events to control the resulting WSDL documentation. You can identify mappings between function return values and parameter names, namespace usage, and default SOAP. On the client side, text encoding adds support for RPC-style encoding.
The new interface IRIOaccess allows you to access remote interface objects that implement the calling interface.
The IOPConvert interface adds the Encoding property, allowing you to specify a character set when transferring encoded information between the client and the web service provider.
Changes in certain WEB services have a certain impact on DataSnap applications. Please refer to the section "Changes in Database Technology" for details.
The constructor of the TLinkedRIO class automatically generates a separate file name for each method you call, making debugging more convenient.
The TOPToSoapDomConvert class adds two events to debug SOAP packages.
Custom calling interfaces can use overloaded methods.
4. Changes in COM technology (delphi professional and enterprise versions only)
Use the Import Type Library dialog box (Engineering Type Library) to create a federation class wrapper for .NET compilation. Using Microsoft's .NET framework you can use the result wrapper of a normal COM server.
5. Changes in database technology (delphi professional and enterprise versions only)
Updated the dbExpress drivers for Informix SE, Oracle9i, DB2 7.2, InterBase 6.5 and MySQL 3.23.49, and added the MSSQL 2000 driver.
New database controls have been added, and some original controls have been changed. For details, please refer to the "Control Library Change" section.
Borland does not advocate the use of SQL Links, and subsequent versions will no longer strengthen support for SQL Links, and will abandon support for SQL Links in post-2002 versions. Borland recommends using dbExpress to access SQL Server database.
DataSnap (delphi enterprise version only)
In DataSnap applications, IAppServer has become IAppServerSOAP to make the IAppServer interface more clear. The UseSOAPAdapter property of the TSoapConnection class can be used to write clients for server applications developed using earlier Delphi versions. The TSoapConnection class also releases several new events that allow you to customize your client application in several aspects when handling WEB service requests.
You can use the SOAPServerIID attribute or add a data module interface to the terminal of the URL to clearly identify the SOAP data module of the application server with multiple data modules.
You can use the SOAPServerIID property and GetSOAPServer method of the SOAP connection control to extend the application server interface.
DataSnap no longer supports CORBA connections.
6. Control library changes
6.1 Windows XP theme support (Delphi Professional Edition and Enterprise Edition)
VCL applications support Wiondows version 6 universal controls. After your application finds a suitable mount file, it will automatically use the new Windows controls on Windows XP system.
6.2 New units added
The new DBClientActns unit includes 3 new action controls TClientDataSetApply, TClientDataSetUndo and TClientDataSetRevert for working with client datasets.
6.3 Added new controls
The dbExpress page of the control panel has added a TSimpleDataSet control for use by simple two-layer database applications (TSimpleDataSet replaces TSQLClientDataSet).
The TPageSetupDialog control has been added to the Dialogs page of the control panel. It provides a Wiondow standard page setting dialog box.
The Additional page of the control panel adds TXPColorMap, TStandardColorMap and TTwilightColorMap to create colored menus and toolbars.
The System page of the new CLX version control panel adds new paths and file controls.
The Indy Intercepts and Indy I/O Handlers pages of the Control Panel provide network protocols (Pro and Enterprise Editions).
6.4 Changes to the control
The CLX version of the TOpenDialog and TSaveDialog controls add additional features such as supporting file previews.
The VCL version of the TCustomForm control adds two properties ScreenSnap and SnapBuffer to control whether the window is attached to the edge of the screen when it moves.
The TCustomComboBoxEx control adds the AutoCompleteOptions property to enable the drop-down box to respond to user keystrokes.
The CLX dialog object inherited from TOpenDialog and TQtDialog can be used instead of the Qt dialog box by setting the UseNativeDialog property to true.
6.5 Controls not recommended
Please refer to the readme.txt document under the Delphi7 folder.
7. Changes in runtime library
7.1 Classes unit
New exception classes EfileStreamError, EfileStreamError and EFOpenError inherited from this class. This class has a file name parameter, so the exception information now contains the file name of the file where the exception occurred.
The TStrings class adds two new properties: ValueFromIndex and NameValueSeparator.
The CheckThreadError method of the TThread class has changed from private to public.
7.2 Math unit
The ClearExceptions process of this unit adds the default parameter RaisePending.
7.3 StdConvs Unit
StdConvs unit adds weight units stones (stone, 14 lbs).
7.4 StrUtils unit
The StrUtils unit has the following variations to support multibyte character sets (MBCS).
Previous LeftStr, RightStr, and MidStr functions took AnsiString as parameters and return values and did not support MBCS strings. Now each function has been replaced by a pair of overloaded functions, one with AnsiString as the parameter and return value, and the other with WideString as the parameter and return value. These new functions can manipulate MBCS strings correctly. This change breaks the encoding rules for storing and obtaining single-byte horizontal strings with these functions, which must be updated to use the new single-byte function described below.
The new functions LeftBStr, RightBStr, and MidBStr provide single-byte horizontal string operations instead of the previous LeftStr, RightStr, and MidStr.
The new functions AnsiLeftStr, AnsiRightStr and AnsiMidStr are the same as the new AnsiStr operation functions LeftStr, RightStr and MidStr, except that they are not overloaded by the same WideString function.
The string search function PosEx is added to the StrUtils unit.
7.5 SysUtils Unit
The SysUtils unit adds a thread-safe overload function to format and parse numbers, datetime values and currency type values. They are thread-safe because they get local information from the data structure of the TformatSettings class instead of global variables. The data structure must be ported before use, and the new function GetLocaleFormatSettings is used to port the data structure from the specified location.
7.6 VarCmplx unit
VarCmplx unit adds functions VarComplexLog2, VarComplexLog10, VarComplexLogN, VarComplexTimesImaginary and VarComplexTimesReal.
7.7 Variants unit
Added VarIsError and VarAsError functions.
The exception EvariantError is now the basis for the exception class thrown by the variable type code.
Several new global control variables, NullEqualityRule, NullMagnitudeRule, NullStrictConvert, NullAsStringValue and PackVarCreation, were added.
8. Changes in the compiler
Delphi's dcc32 compiler adds three new compilation warnings: Unsafe_Type, Unsafe_Code and Unsafe_Cast. These warnings are turned off by default and can be turned on by the compiler indicating {$WARN UNSAFE_CODE ON}, the compiler command line switch (dcc32 -W+UNSAFE_CODE), or by the Project|Options|Compiler Messages page.
9. Rave report support
Delphi now includes Rave reports from Nevrona, adding report controls to the application you develop, allowing users to generate reports. For more information, please refer to the section "Create Rave Reports".
10. ModelMaker support (Professional and Enterprise Editions)
ModelMaker tools can simplify the design, construction and maintenance of classes and interfaces. ModelMaker contains tools that can create UML style diagrams for creating and modifying project source code.
Delphi Enterprise Edition includes ModelMaker from ModelMaker Software, and the Professional Edition includes ModelMaker with a 30-day trial period, but they have the same functionality.
11. Document changes
All PDF, HTML and INT documents are published by the Delphi accompanying tool disk, not the installation disk. You can view documents directly from the CD or copy them to your folder, accompanied by the tool disk including the following documents:
Document introduction | Storage path in tool disk |
Using Delphi (the Quick Start, Developer's Guide, Component Writer's Guide, Delphi Language Guide, and object hierarchy posters) | Online+PDF Docs/Borland |
Step-by-step instructions on creating Delphi applications | Online+PDF Docs/Borland/Tutorials |
IDL2Pas | Online+PDF Docs/Borland/IDL2Pas |
Interfaces | Online+PDF Docs/Borland/Interface Docs |
IntraWeb | Online+PDF Docs/Intraweb |
ModelMaker | Online+PDF Docs/ModelMaker |
Rave Reports | Online+PDF Docs/Rave |
Due to the size limitations of the Developer Guide, Part 5, “Creating Custom Controls” is no longer included in the book, but is separately compiled as “Creating New Controls Author Guide”, which is available from online help or from The PDF document is obtained with the tool disc.
The Object Pascal language is now called the delphi language, and online help and documentation have also been made accordingly.
To ensure that the delphi guides continue to work, they have been moved from Quick Start and Developer Guide, and you can get PDF documents from the accompanying tool disc.
Some delphi online help topics include C++ syntax and code examples for Kylix and C++Builder users, which you can ignore as delphi developers.