D7 Whats New
D7 Whats New
D7 Whats New
Borland
Delphi 7
for Windows
Borland Software Corporation 100 Enterprise Way, Scotts Valley, CA 95066-3249
COPYRIGHT 2002 Borland Software Corporation. All rights reserved. All Borland brand and product names are trademarks or registered trademarks of Borland Software Corporation in the United States and other countries. All other marks are the property of their respective owners. D7-WN-0802
Chapter0
If you are upgrading from a previous version of Delphi, see Upgrade and compatibility issues on page 10.
IDE changes
The IDE has new features in the following areas:
Compiler messages
The new View|Additional Message Info command displays a Message Hints window from which you can download and view information about compiler messages from Borland's Web site. The new Project|Options|Compiler Messages page gives you greater control over which compiler warnings are generated.
If a component page can be scrolled horizontally to display additional icons, a new drop-down menu button can also be used to list the additional icons.
Debugger changes
The Watch List now has: Multiple tabs, allowing you to organize watches into distinct watch groups for easier debugging. To add a watch group, right-click the Watch List and select Add Group. A Watch Name column and a Value column. To show/hide the column headers, right-click the Watch List and select Show Column Headers. A checkbox to enable or disable individual watches. The Tools|Debugger Options|Event Log page has the following new options: Use Event Log Colors lets you display different types of event messages in color in the event log. Module messages writes a message to the event log each time a module (exe, dll, ocx, etc.) is loaded or unloaded by the process that you are debugging. Previously, the Process messages option controlled whether these events were logged. The Run Parameters dialog box has a new option, Working Directory, that lets you specify the name of the directory to use for the debugging process.
Miscellaneous improvements
From the Project Manager, you can partially compile projects within a group by right-clicking on any project and choosing Make All from Here or Build All from Here. The Message view has multiple tabs for displaying different types of messages (Build, Search, and so on). The View|Component List command lets you multiselect components by pressing the Ctrl key. The new Tools|Editor Options|Source Options page lets you: Set different editor options for different source types, such as Pascal, C++, C#, HTML, and XML.
2
Display tab and space characters in the Code editor. Edit code templates. Several of the options on the new page were formerly on the General, Display, and Code Insight pages of the Editor Properties dialog box. The Tools|Editor Options|Color page has two new options, Foreground Color and Background Color, instead of a color grid, for setting colors in the Code editor. Pressing Alt+Page Down and Alt+Page Up cycles through tabbed views such as the Code editor, Watch Window, and Message view. These keyboard shortcuts are included in the Default, IDE Classic, and BRIEF key mappings. Delphi now displays a two-tone main menu.
Web Services
Web Services includes the following enhancements.
SOAP headers
New classes and interfaces let you read or insert headers into the SOAP envelopes that transmit messages between clients and servers. For more information, see Defining and using SOAP headers and Processing headers in client applications in the Developers Guide or online Help.
Attachments
Web Services applications (both client and server) can now handle attachments. Attachments (TSOAPAttachment descendants) are sent with SOAP-encoded messages as part of a multipart form. When an application receives the attachment, it saves it to a temporary file, which is then available to your application.
Type support
You can now customize the conversion between remotable classes and their SOAP representation by overriding two new virtual methods that were added to TRemotable: ObjectToSOAP and SOAPToObject. Exception objects for exceptions that occur when responding to a Web Service request (ERemotableException instances) now contain more information from the SOAP fault packet. Type definitions are automatically registered with the remotable type registry when you register an invokable interface. TXSDecimal has a new AsBcd property for easier conversion between XML and native types. Similarly, TXSHexBinary has a new AsByteArray property. Remotable classes that represent time values now let you work with fractional seconds rather than milliseconds.
Other enhancements
New events on THTTPReqResp let you to intercept the HTTP message before it is sent, and to monitor progress while sending or receiving long messages. THTTPSoapPascalInvoker now publish events that let you write code to execute before or after the invoker executes a requested method call. You now have more control over the mapping between invokable interfaces and WSDL documents. TWSDLHTMLPublish now publishes several events to let you control the generated WSDL. You can also identify the mapping between function return values and parameter names, the use of namespaces, and default SOAP actions. On the client side, literal encodings are now supported as well as RPCstyle encoding. A new interface, IRIOAccess lets you access the remote interfaced object that implements an invokable interface. The IOPConvert interface has a new property: Encoding. This allows you to specify the character set to use for encoded messages that are passed between the client and Web Service provider. There are changes to Web Services that affect DataSnap applications. For more information, see Database technology changes (Professional and Enterprise editions) on page 5. The TLinkedRIO constructor now automatically generates separate file names for each method you call, making debugging easier.
TOPToSoapDomConvert now has two new events that you can use when debugging the deserialization of SOAP packets. You can now use overloaded methods on invokable interfaces that you define.
New unit
The new DBClientActns unit contains three new action components for working with client datasets: TClientDataSetApply, TClientDataSetUndo, and TClientDataSetRevert.
New components
The dbExpress page of the Component palette includes TSimpleDataSet for use with simple, two-tier database applications (TSimpleDataSet replaces TSQLClientDataSet). The Dialogs page of the Component palette includes TPageSetupDialog for providing a Windows standard page setup dialog box. The Additional page of the Component palette includes TXPColorMap, TStandardColorMap, and TTwilightColorMap for colorizing menus and toolbars. The new CLX version of the System page of the Component palette includes new directory and file components. The new Indy Intercepts and Indy I/O Handlers pages on Component palette provide Internet protocols. (Professional and Enterprise editions)
Changed components
The CLX versions of TOpenDialog and TSaveDialog have been expanded to support additional features such as file previewing. The VCL version of TCustomForm has two new properties, ScreenSnap and SnapBuffer, which control whether a form snaps to the edge of the screen when the form is moved. TCustomComboBoxEx has a new AutoCompleteOptions property that enables a combo box to respond to user keystrokes. CLX dialog objects that descend from TOpenDialog and TQtDialog can now use Windows Common Dialogs in place of Qt Dialogs. This behavior is controlled by the UseNativeDialog property, which defaults to true.
Deprecated components
Information about deprecated components can be found in the readme.txt file in the Delphi7 directory.
Math unit
The Math unit has a new default parameter, RaisePending, in the ClearExceptions procedure.
StdConvs unit
The StdConvs unit now includes stones in the supported weight units.
StrUtils unit
The StrUtils unit contains the following changes related to multi-byte character set (MBCS) support: Previously, LeftStr, RightStr, and MidStr each had an AnsiString parameter type and return type, and did not support MBCS strings. Each of these functions has been replaced by a pair of overloaded functions, one that takes and returns AnsiString, and one that takes and returns WideString. The new functions correctly handle MBCS strings. This change breaks code that uses these functions to store and retrieve byte values in AnsiStrings. Such code should be updated to use the new byte-level functions described below. New functions LeftBStr, RightBStr, and MidBStr provide the byte-level manipulation previously provided by LeftStr, RightStr, and MidStr. New functions AnsiLeftStr, AnsiRightStr, and AnsiMidStr are the same as the new AnsiStr LeftStr, RightStr, and MidStr functions, except that they are not overloaded with equivalent WideString functions. The StrUtils unit has a new string-searching function called PosEx.
SysUtils unit
The SysUtils unit now includes thread-safe overloads of routines that format and parse numbers, date-time values, and currency. The new routines are thread-safe because they obtain their localization information from a TFormatSettings data structure instead of from global variables. This data structure must be populated
before being used; a new function, GetLocaleFormatSettings, is provided to populate the data structure from a specified locale.
VarCmplx unit
The VarCmplx unit has new functions: VarComplexLog2, VarComplexLog10, VarComplexLogN, VarComplexTimesImaginary, and VarComplexTimesReal.
Variants unit
The VarIsError and VarAsError functions have been added. The EVariantError exception is now a base class for finer grained exception classes that are thrown from variants code. Several new global Variant control variables have been added: NullEqualityRule, NullMagnitudeRule, NullStrictConvert, NullAsStringValue, and PackVarCreation.
Compiler changes
The Delphi compiler now supports three additional compiler warnings: Unsafe_Type, Unsafe_Code, and Unsafe_Cast. These warnings are disabled by default, but can be enabled with the compiler directive {$WARN UNSAFE_CODE ON}, compiler command line switch (dcc32 -W+UNSAFE_CODE), and, in the IDE, on the Project|Options|Compiler Messages page. This feature is intended to help you port your code to the managed execution environment of Microsoft's .NET platform. In a managed execution environment, "unsafe" means the operation cannot be verified during the static analysis performed by the Just In Time (JIT) compiler. Such code might pose a security risk, since there is not enough information for the JIT compiler to verify its runtime behavior. Examples of unsafe code include pointer operations and memory overwrites.
The Enterprise edition of Delphi includes ModelMaker from ModelMaker software. The Professional edition of Delphi includes a 30-day trial version of ModelMaker. The ModelMaker functionality is the same in both editions of Delphi.
Documentation changes
All of the documentation files (PDF, HTML, and INT) are now distributed on the Delphi Companion Tools CD instead of the installation CD. You can access the documentation directly from the CD or copy it to the folder of your choice. The Companion Tools CD includes the following documentation:
For documentation about:
Using Delphi (the Quick Start, Developers Guide, Component Writers Guide, Delphi Language Guide, and object hierarchy posters) Step-by-step instructions on creating Delphi applications IDL2Pas Interfaces IntraWeb ModelMaker Rave Reports
Online+PDF Docs\Borland\Tutorials Online+PDF Docs\Borland\IDL2Pas Online+PDF Docs\Borland\Interface Docs Online+PDF Docs\Intraweb Online+PDF Docs\ModelMaker Online+PDF Docs\Rave
Due to size constraints for the printed Developer's Guide, Part V, Creating custom components has been removed from that book to create the new Component Writer's Guide The new book is available in the online Help and as a PDF file on the Delphi Companion Tools CD. The Object Pascal language is now called the Delphi language. The online Help and documentation have been updated accordingly. The Object Pascal Language Guide is now the Delphi Language Guide. To ensure the continued accuracy of the Delphi tutorials, they have been removed from the Quick Start and the Developer's Guide. The tutorials are available as PDF files on the Delphi Companion Tools CD. Some of the Delphi online help topics include C++ syntax and code examples for our Kylix and C++Builder users. For Delphi development, please disregard these examples.
10