0% found this document useful (0 votes)
85 views6 pages

Delphi 2007 Handbook Toc

Uploaded by

kunal.giri0919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views6 pages

Delphi 2007 Handbook Toc

Uploaded by

kunal.giri0919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Table of Contents - 11

Table Of
Contents

Acknowledgments.........................................................................................5

Introduction..................................................................................................7
From Mastering Delphi to this Handbook..................................................................7
Formatting and Conventions.......................................................................................8
Examples and Source Code.........................................................................................9
Seminars and Consulting.............................................................................................9
About the Author...............................................................................................................9
Contacting the Author................................................................................................10
Looking for Tech Support?........................................................................................10

Table of Contents.........................................................................................11

Marco Cantù, Delphi 2007 Handbook


Table of Contents - 12

1: The Delphi 2007 IDE.................................................................................17


A Short History of the Delphi IDE..................................................................................18
A Single Personality...................................................................................................18
A Non-Breaking Version............................................................................................19
Installing Delphi 2007.....................................................................................................19
The New Folder Structure.........................................................................................20
Running the Delphi IDE..................................................................................................21
A New IDE..................................................................................................................22
A Themed IDE............................................................................................................23
The Welcome Page.....................................................................................................23
The Delphi Editor ...........................................................................................................24
Code Folding and Regions.........................................................................................25
Source Code File Encoding........................................................................................26
Sync Edit.....................................................................................................................27
Editor History.............................................................................................................27
Other (Recent) Editor Features.................................................................................29
The VCL Form Designer.................................................................................................30
Text Baseline for Components Developers................................................................31
Searching in the Tool Palette.....................................................................................32
Making Help Insight Work.............................................................................................32
Generate XML Documentation.................................................................................33
Other Features of the Delphi IDE...................................................................................35
Extended Search Results...........................................................................................35
File Browser View......................................................................................................36
Database Management Tools....................................................................................36
(Limited) ALM Support in the IDE...........................................................................37
The New Help System................................................................................................37

2: Code Templates and Refactoring.............................................................39


Block Completion............................................................................................................40
Live Templates................................................................................................................40
Customizing and Writing Live Templates.................................................................43
Custom Live Templates..............................................................................................47
A Live Template for Help Insight..............................................................................48
Refactoring......................................................................................................................49
Declare Refactoring...................................................................................................50
Extract to Resource String.........................................................................................51
Rename Refactoring...................................................................................................52
Extract Method..........................................................................................................54
Find Unit Refactoring................................................................................................56
Change Parameters....................................................................................................57
Extract Interface and Superclass...............................................................................58
Introduce Field, Introduce Variable, and Inline Variable........................................59
More Together Refactorings......................................................................................60
Find References..........................................................................................................61

Marco Cantù, Delphi 2007 Handbook


Table of Contents - 13

3: Project Management and MSBuild..........................................................63


The .dproj File Format....................................................................................................64
The Build Process............................................................................................................67
Manual Builds............................................................................................................67
Compilation Output...................................................................................................68
Build Events...............................................................................................................69
Custom Targets..........................................................................................................70
Build Configurations..................................................................................................71
The Project Manager.......................................................................................................72
Using Old-Style Build Tools.......................................................................................73

4: The Debugger...........................................................................................75
About Breakpoints...........................................................................................................75
New Stack Breakpoints..............................................................................................76
Fly-by Evaluation.............................................................................................................77
Other Features.................................................................................................................78

5: Recent Updates to the Delphi Language...................................................79


When Private Is Really Private.......................................................................................80
Classes and Inheritance...................................................................................................81
Abstract Classes..........................................................................................................81
Sealed Classes and Final Methods.............................................................................81
Class Data...................................................................................................................82
Class Static Methods..................................................................................................83
Class Properties..........................................................................................................86
Nested Types and Nested Constants.........................................................................86
Exceptions and Constructors....................................................................................88
Class Helpers..............................................................................................................89
The for..in Loop...............................................................................................................92
Inlining............................................................................................................................96
Records on Steroids........................................................................................................99
Records or Classes?..................................................................................................100
Operators Gain New Ground...................................................................................102
The Delphi 2007 Compiler............................................................................................105
Version......................................................................................................................106
Automatic RTTI, or not?..........................................................................................106
DEP, ASLR and NX Support....................................................................................107

6: Core RTL Changes..................................................................................109


FastCode in the RTL......................................................................................................110
New Features for Collections.........................................................................................111
Enumerating Containers (with a Class Helper).......................................................111
Strings and StringLists ............................................................................................114
WideStrings and Unicode..............................................................................................115
WideStringLists.........................................................................................................115

Marco Cantù, Delphi 2007 Handbook


Table of Contents - 14

Other New RTL Features...............................................................................................116


Executable Size under the Microscope....................................................................117

7: Changes in the VCL.................................................................................119


Flexible UI with Margins and Paddings.......................................................................120
Margins.....................................................................................................................120
Padding......................................................................................................................121
Layout Panels: Flow and Grid.......................................................................................121
Align and the Explicit Properties.............................................................................123
ButtonGroup and CategoryButtons..............................................................................124
CategoryButtons Updates in Delphi 2007..............................................................126
Modal Forms and PopupMode.....................................................................................126
Processing Mouse Activation........................................................................................127
Docking Components: DockedTabSet..........................................................................128
The TrayIcon Component........................................................................................130
Assorted New Features..................................................................................................131

8: Memory Management (and Robust Applications)..................................133


FastMM4........................................................................................................................134
Comparing Allocators...............................................................................................135
Tracking Leaks and Other
Global Settings..........................................................................................................141
Memory Status.........................................................................................................143
Buffer Overruns in the Full FastMM4.....................................................................144
Safe Coding Techniques.................................................................................................147
Constructors, Destructors, and Exceptions.............................................................147
Finally blocks............................................................................................................149
Dynamic Type Checking...........................................................................................150
Is this Pointer an Object Reference?........................................................................151
Mixing Objects and Interfaces.................................................................................153
Unit Testing....................................................................................................................154
DUnit.........................................................................................................................155

9: Windows Vista and the VCL....................................................................161


Delphi and Vista: The Basics.........................................................................................162
Windows' Version Checking....................................................................................162
The Segoe UI Font....................................................................................................163
Vista UI Experience.......................................................................................................165
VCL Applications and the TaskBar..........................................................................165
Extending Glass........................................................................................................167
Task Dialogs..............................................................................................................170
New Common Dialogs..............................................................................................176
Themes and Styles.........................................................................................................178
Enabling Themes......................................................................................................179
Themed VCL Controls..............................................................................................179

Marco Cantù, Delphi 2007 Handbook


Table of Contents - 15

The New TreeView Style..........................................................................................180


Windows Resource Protection and User Account Control..........................................181
Windows Resource Protection (WRP).....................................................................181
Virtual Storage..........................................................................................................183
User Account Control...............................................................................................183
Elevation...................................................................................................................184
More Vista Features and Problems...............................................................................187
Built-in Animations..................................................................................................187
Internet Explorer in Protected Mode......................................................................188
PNG Icons.................................................................................................................189
Debug Your OnPaint................................................................................................189
Delphi and Vista, Again.................................................................................................189

10: Database Support and dbExpress 4......................................................191


DB Unicode Support......................................................................................................192
dbExpress in Delphi 2006.............................................................................................194
dbExpress 4 in Delphi 2007..........................................................................................195
Using dbExpress 4 (Upgrading a Program)............................................................197
Using dbExpress 4 (Writing a New Program)........................................................200
A Second Look to dbExpress 4 (Configuration Files)............................................203
dbExpress Drivers....................................................................................................204
Delegate Drivers: Connection Sharing and Tracing...............................................205
dbExpress 4 Internals....................................................................................................212
Using the DBXCommon classes...............................................................................212
Database Explorer for dbExpress.................................................................................218
Other DB-Related Changes...........................................................................................219

11: InstallAware and Other Tools...............................................................221


InstallAware Express.....................................................................................................222
Installing Runtime Packages...................................................................................222
Installing a dbExpress Application.........................................................................226
WSDL Importer and SOAP...........................................................................................227
My Own Delphi Tools....................................................................................................228
CanTools Wizards....................................................................................................228
Object Debugger......................................................................................................230
Memory Snap...........................................................................................................230
Other Relevant Free Tools.............................................................................................231
Indy...........................................................................................................................231
Project JEDI.............................................................................................................232
GExperts...................................................................................................................232
OpenXML and libxml2-pas.....................................................................................233
Former TurboPower Components..........................................................................233
What Else?................................................................................................................235
Professional Components........................................................................................235

Marco Cantù, Delphi 2007 Handbook


Table of Contents - 16

12: Upgrading Projects to Delphi 2007.......................................................237


Managing Source Code Files.........................................................................................238
Backward Compatibility and the Explicit* Properties...........................................238
Variants Troubles..........................................................................................................239
Conflicting Unit Names............................................................................................241
Porting VCL Applications..............................................................................................241
Upgrading Database Projects.......................................................................................242
BDE Upgrade Paths.................................................................................................243
Porting from Indy to Indy 10........................................................................................244
Using Low-Level Sockets.........................................................................................246
Web Development.........................................................................................................250

Postscript...................................................................................................251

Index.........................................................................................................253

Marco Cantù, Delphi 2007 Handbook

You might also like