Release Notes for XE2 Update 4
Go Up to What's New in Delphi and C++Builder XE2
This file contains important supplementary information that might not appear in the main product documentation. Embarcadero Technologies recommends that you read this file in its entirety.
This document refers to "the product" when the information applies to RAD Studio XE2 or to either or both of the two personalities: Delphi XE2 and C++Builder XE2.
For general information about installation, deployment, and licensing, see the Install, Deploy, and License HTML files located, by default, at C:\Program Files\Embarcadero\RAD Studio\9.0. On a 64-bit Windows system, the directory is C:\Program Files (x86)\Embarcadero\RAD Studio\9.0.
Obtaining this Update
Delphi and C++Builder XE2 Update 4 is a full inline update that requires uninstalling your existing RAD Studio product before installing the update.
You can obtain this update in any of the following three ways:
- Upgrading via the Automatic Upgrade Mechanism
- Manually Checking for Updates
- Downloading from the Registered Users Web Page
Using the Automatic Upgrade Mechanism or Manually Checking for Updates
- If you selected Check for Updates Automatically when you installed the product, you should automatically be notified when an update is available for download.
- Click the notification to start the update installer.
- Follow the instructions given in the installer.
- After product installation completes, perform the additional steps described in #Additional Installation Steps.
- If you do not receive an automatic notification about the update (or at any time), you can check for updates manually:
- Select Start | Programs | Embarcadero RAD Studio XE2 | Check for updates.
- In the list of available updates, select Update 4. This starts the installer.
- Follow the instructions given in the installer.
- After the product installation completes, perform the additional steps described in #Additional Installation Steps.
Downloading from the Registered Users Web Page
Update 4 is also available for download from the registered users download pages as follows:
- Delphi XE2: http://cc.embarcadero.com/reg/delphi
- C++Builder XE2: http://cc.embarcadero.com/reg/c_builder
- RAD Studio XE2: http://cc.embarcadero.com/reg/rad_studio
- Download the update to your computer and extract the zip file.
- Uninstall the product. For instructions, see Installation Notes for XE2#Uninstalling the Product.
- Install the update by double-clicking the installer.
Then follow the #Additional Installation Steps to install the update.
Additional Installation Steps
After you obtain and install the update, as described in the preceding sections, you should update the Platform Assistant and FireMonkey iOS tools (using the steps described here) if you are using doing cross-platform development or using FireMonkey for iOS:
1. Install the Platform Assistant Update
If you are using the Platform Assistant for cross-platform application development, after you install Update 4, you should uninstall the Platform Assistant and then install the updated Platform Assistant, as described here:
- To uninstall the Platform Assistant:
- On Windows, use the existing Uninstall PAServer.exe to uninstall the Platform Assistant.
- On the Mac, use the existing Uninstall command to uninstall the Platform Assistant.
- Note: The Uninstall programs are located in the installation directory for the Platform Assistant on the PC and on the Mac.
- To install the updated Platform Assistant on your target platforms:
- On Windows, double-click PAServer.exe.
- On the Mac, move the PAServer.zip file to the Mac and double-click PAServer.zip.
For more information, see Installing and Running the Platform Assistant (paserver) on the Target Platform.
2. Reinstall FireMonkey iOS Tools
If you are using FireMonkey iOS tools on the Mac, you also need to reinstall the FireMonkey-iOS-XE2.pkg, as follows:
- Transfer the FireMonkey-iOS.dmg disk image file to the Mac. (FireMonkey-iOS.dmg is located inside the top-level "FireMonkey-iOS" folder in your product installation directory.)
- On the Mac, double-click FireMonkey-iOS.dmg.
- Run the installer inside each package.
There is no uninstall required for the FireMonkey iOS tools. If you previously installed the FireMonkey iOS tools, you can run the new installer (FireMonkey-iOS.dmg) that is part of this update without doing any uninstall.
Notes:
- The FireMonkey-iOS installer is compatible with Xcode 4.2.
- Although Xcode 4.2 includes the iOS 5.0 SDK, the new features of iOS 5 are not supported. FireMonkey applications can, however, be deployed to devices running iOS 5.
- The FireMonkey-iOS installer fails if Xcode 4.3/iOS 5.1 (beta) is installed on the Mac.
For more information about FireMonkey iOS, see:
- Installation Notes for XE2#FireMonkey iOS Requirements
- FireMonkey Platform Prerequisites
- FireMonkey Development Setup for iOS
- Creating a FireMonkey iOS App
Uninstalling this Update
If you need to uninstall the update, you must uninstall the entire product and reinstall a full build. It is not possible to uninstall only the update.
General Notes
Bug List
For a complete list of the specific problems fixed in this update, see the "List of Bug Fixes in Delphi and C++Builder XE2 Update 4" at: http://edn.embarcadero.com/article/42090/
Changes and New Functionality in XE2 Update 4
This update includes the following new and changed features:
- Firemonkey OS X changes:
- Printing support has been added.
- Performance improvements have been added for:
- FMX.Edit.TEdit
- FMX.Memo.TMemo
- FMX.Memo.TMemo.Text now has public access (previously had published access).
- For manipulating the text in a TMemo at design time, you should now use FMX.Memo.TMemo.Lines.
- Shaders
- Loading a form from a DLL is now supported
- For more information, see Libraries and Packages and Cross-Platform Shared Libraries.
- FireMonkey iOS changes:
- Support for Free Pascal version 2.6.0 has been added.
- For more information, see:
- DataSnap mobile connector added for Free Pascal Compler
- Scrolling behavior has been improved.
- Support for Free Pascal version 2.6.0 has been added.
- Workaround is available for accessing global variables in ASM code on OS X
- For more information, see Accessing Global Variables in ASM on Windows and OS X).
Interface Changes in Update 4
FireMonkey Interface Changes: The following changes were made to FireMonkey for Update 4.
Types and Methods Added or Modified
FMX.Colors:
- TColorQuad.GetIsTracking
- TColorQuad.PreviewColor
- TColorQuad.SetColor
- TColorComboBox.GetDefaultStyleLookupName
- TColorListBox.GetDefaultStyleLookupName
- TColorListBox.SetItems
- TComboColorBox.GetDefaultStyleLookupName
- FillChessBoardBrush
FMX.Consts:
- sCannotCreateCircularDependence
- sCantEndPrintJob
- sCantPrintNewPage
- sCantSetNumCopies
- sCantStartPrintJob
- sInvalidPageFormat
- sInvalidPrinterSettings
- sMkcCmd
- SPropertyOutOfRange
- SPrinterDPIChangeError
- SPrinterSettingsReadErro
- SPrinterSettingsWriteError
FMX.Controls:
- TAniIndicator.ApplyStyle
- TAniIndicator.FreeStyle
- TBitmapTrackBar.GetDefaultStyleLookupName
- TCustomTrack.GetThumbSize
FMX.Dialogs:
- TPageSetupDialog.SetPageHeight
- TPageSetupDialog.SetPageWidth
FMX.Edit:
- TComboEditBase
- TComboEdit.Clear
- TComboEdit.MouseWheel
- TComboEdit.GetDefaultStyleLookupName
- TComboEdit.SetText
- TComboTrackBar.GetDefaultStyleLookupName
- TComboTrackBar.DoComboMouseDown
- TCustomEdit.DoChangeTracking
- TCustomEditBox
FMX.Effects:
- TInnerGlowEffect.GetGlowColor
- TInnerGlowEffect.SetGlowColor
- TInnerGlowEffect.SetOpacity
- TInnerGlowEffect.SetSoftness
FMX.ExtCtrls:
- TCalendarBox.GetDefaultStyleLookupName
- TCalendarEdit.GetDefaultStyleLookupName
- TImageViewer.GetDefaultStyleLookupName
FMX.FilterCatStyle:
- TGlowFilter
- TInnerGlowFilter
- TReflectionFilter
FMX.Grid:
- TColumn.SetVisible
- TColumn.TextChangeProc
- TColumn.TextTypingProc
- TCustomGrid.DoSelChanged
- TCustomGrid.GetVisibleColumnCount
- TCustomGrid.SetTopRow
FMX.Layers3D:
- TImage3D.SetBitmap
FMX.Layouts:
- TScrollBox.CreateHScrollTrackAni
- TScrollBox.CreateVScrollTrackAni
- TScrollBox.Center
FMX.Memo:
- TMemo.DefineProperties
- TMemo.DoContentPaintWithCache
- TMemo.HScrollChange
- TMemo.ReadTextData
- TMemo.ResetLineWidthCache
FMX.Menus:
- TextToShortcut
- TPopupMenu.DialogKey
FMX.Objects3D:
- TDisk
- TCone.RebuildMesh
- TCone.SetSubdivisionsAxes
- TCone.SetSubdivisionsCap
- TCone.SetSubdivisionsHeight
- TCube.RebuildMesh
- TCube.SetSubdivisionsDepth
- TCube.SetSubdivisionsWidth
- TCube.SetSubdivisionsHeight
- TCylinder.RebuildMesh
- TCylinder.SetSubdivisionsAxes
- TCylinder.SetSubdivisionsCap
- TCylinder.SetSubdivisionsHeight
- TMesh.Render
- TPlane.RebuildMesh
- TPlane.SetSubdivisions.Height
- TPlane.SetSubdivisions.Width
- TSphere.RebuildMesh
- TSphere.SetSubdivisionsAxes
- TSphere.SetSubdivisionsHeight
FMX.Printer:
- EPrinterSettingsError
- TPrinterDevice.Destroy
- TPrinterDevice.DPIChangeError
- TPrinterDevice.GetActiveDPI
- TPrinterDevice.GetDPI
- TPrinterDevice.GetDPICount
- TPrinterDevice.SelectDPI
- TPrinterDeivce.SetActiveDPIIndex
FMX.Printer.Win:
- TPrinterWin destructor
- TPrinterWin.RefreshActivePrinter
- TPrinterWin.SetCanvasDefaultSettings
FMX.Types:
- CreateScaleMatrix
- CreateTranslateMatrix
- MergeObjectFromStream
- TBrushBitmap.DoChanged
- TControl.GetAcceptsControls
- TControl.SetAcceptsControls
- TStyleBook.LoadFromFile
- PClipRects
- TClipRects
- TCanvas.BeginScene
- TCanvas.DoBeginScene
- TCanvas.DoEndScene
- TFmxObject.IsChildren
- TStyledControl.GetDefaultStyleLookupName
FMX.Types3D:
- ColorToVector3D
- CreateTranslateMatrix3D
- DefaultAmbient
- DefaultDiffuse
- DefaultSpecular
- MaxLights
- TContext3D.AssignTo
- TContext3D.DoBeginScene
- TContext3D.DoEndScene
- TContext3D.AddLight
- TContext3D.CreateBuffer
- TContext3D.CreateDefaultShader
- TContext3D.DeleteLight
- TContext3D.FreeBuffer
- TContext3D.FreeDefaultShader
- TContext3D.GetPixelToPixelPolygonOffset
- TContext3D.SetMatrix
- TContext3D.SetParams
- TControl3D.GetAcceptsControls
- TControl3D.SetAcceptsControls
- TLight.SetAmbient
- TLight.SetConstantAttenuation
- TLight.SetDiffuse
- TLight.SetLinearAttenuation
- TLight.SetQuadradicAttenuation
- TLight.SetSpecular
- TLight.SetSpotCutOff
- TLight.SetSpotExponent
- TMaterial.SetShininess
- TMeshData.Clear
- TTextureFiltering
- TMaterial.SetTextureFiltering
Types and Methods Removed
FMX.Dialogs:
- TCommonDialog.FHelpMsg
FMX.Edit:
- TComboEdit.MouseDown
- TComboTrackBar.MouseDown
- TNumberBox.Destroy
- TNumberBox.Change
- TNumberBox.GetData
- TNumberBox.KeyDown
- TNumberBox.Paint
- TNumberBox.SetNumValueType
- TNumberBox.SetData
- TNumberBox.SetDecimalDigits
- TNumberBox.SetMax
- TNumberBox.SetMin
- TSpinBox.Destroy
- TSpinBox.Change
- TSpinBox.GetData
- TSpinBox.KeyDown
- TSpinBox.SetNumValueType
- TSpinBox.SetData
- TSpinBox.SetDecimalDigits
- TSpinBox.SetMax
- TSpinBox.SetMin
FMX.ExtCtrls:
- TCalendarEdit.MouseDown
FMX.Forms:
- TCustomForm3D.AddLight
- TCustomForm3D.ApplyLights
- TCustomForm3D.DeleteLight
FMX.Objects3D:
- TCone.Render
- TCylinder.Render
- TPlane.Render
- TPlane destructor
- TRoundCube.Render
- TSphere destructor
- TSphere render
FMX.Types3D:
- TViewPort3D.AddLight
- TViewPort3D.ApplyLights
- TViewPort3D.DeleteLight
Other Methods Added
- System.Variants.DispatchUnsignedAsSigned
- For more information, see Automation Servers and Unsigned Integers.
New VCL Styles Added
This update includes eight new VCL styles:
- Auric.vsf
- CharcoalDarkSlate.vsf
- CyanDusk.vsf
- CyanNight.vsf
- MetroBlack.vsf
- MetroBlue.vsf
- MetroGreen.vsf
- TurquoiseGray.vsf
VCL Styles are typically installed in C:\Users\Public\Documents\RAD Studio\9.0\Styles.
For more information about VCL styles, see VCL Styles Overview.
TLIBIMP.EXE Can Import 64-bit Type Libraries
TLIBIMP.EXE now has both a 32-bit version and a 64-bit version, although a 64-bit application can use a 32-bit type library.
When the current target platform is 64-bit Windows, the IDE now passes "-E64" to GenTLB.exe. The result is a type library whose SYSKIND is SYS_WIN64 (compared to SYSKIND=SYS_WIN32 for a 32-bit type library).
When you are importing a 64-bit type library that depends on another type library that is registered only in the 64-bit keys of the registry, you should use the 64-bit version of TLIBIMP, which you can find in:
$(bds)\bin64\tlibimp.exe
For more information, see TLIBIMP.EXE and GenTLB.exe.
How to Access Global Variables in ASM on Windows and Mac OS X
Follow the recommended best practice, described in Accessing Global Variables in ASM on Windows and OS X.
New C++ Audits
The following new C++ Audits are added:
- ASO - Assignment operator
- CIUCFL - Complex Initialization or Update Clause in for Loop
- CIL - Constructor Initialization List
- ANR - Accessing Null Reference
Known Issues in XE2 Update 4
Nested try ... finally Blocks Might Cause a Problem in DCCOSX Applications
In a Delphi OS X application, nested try ... finally blocks can cause the compiled application to crash at run time. That is, do not place a try ... finally block inside the finally part of another try ... finally block. The workaround is to move the inner try ... finally block into a local/native procedure.
Example:
program BTS289095; { Nested try...finally crashes application } {$APPTYPE CONSOLE} uses System.SysUtils; var Expected: Integer = 0; Counter: Integer = 0; procedure DoTest1; { SIMPLE CASE } var s: string; begin Writeln('DoTest1'); try raise Exception.Create('#1'); finally s := ''; end; end; procedure DoTest3; { FAILURE OCCURS HERE. INVOLVES NESTED TRY..FINALLY } var S: String; begin Writeln('DoTest3'); try raise Exception.Create('#2'); finally try s := ''; finally end; end; end; procedure DoTest2; { WORKAROUND - NESTED TRY..FINALLY PUT INTO LOCAL PROC } var S: String; procedure Temp; begin try s := ''; finally end; end; begin Writeln('DoTest2'); try raise Exception.Create('#2'); finally Temp; end; end; var Procs: array [0..2] of TProcedure = (DoTest1, DoTest2, DoTest3); procedure DoBTS289095; var Proc: TProcedure; begin for Proc in Procs do begin Inc(Expected); try Proc; WriteLn('FAIL - Exception Expected'); except Inc(Counter); end; end; end; begin DoBTS289095; if Counter = Expected then WriteLn('PASS') else WriteLn('FAIL'); end.
Building Mac OS X Applications on the Mac
If you are using an early version of XE2, you might encounter a few problems when you try to create an installer package using the productbuild command on the Mac:
- An error message such as the following might be emitted:
productbuild: error: Can't write temporary package to "/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/TemporaryItems/(A Document Being Saved By productbuild)/FireFlow.app.pkg" (Path "/Users/name/Applications/Embarcadero/PAServer/scratch-dir/name- Lion/./FireFlow.app" is not a valid bundle component (using destination path "/Users/name/Applications/Embarcadero/PAServer/scratch-dir/name-Lion/.")).
- To resolve this issue:
- Open your Mac application in the IDE.
- Choose View > Project > Deployment..
- In the Deployment Manager, find the remote file named projectname.info.plist.
- Change the file name to info.plist.
- Save and deploy your Mac application to the Mac.
- An incorrect icon might be displayed for your Mac OS X application.
- To resolve this issue:
- Choose Project > Options > Application.
- Find the Application Icon Settings area, and click the Default button.
For more information about developing applications for Mac OS X, see:
- Creating a FireMonkey Application
- Mac OS X Application Development
- Building a Mac OS X Cross-Platform "Hello World" Console Application
C++ Framework Affinity Issue for Data Modules that are Used by DLLs Targeting OS X
If you start a C++ DLL without specifying framework affinity, and later you want to use the VCL framework, you have to add #include <vcl.h> to the project source. The ClassGroup pseudo-property of the data module also needs to be set to Vcl.Controls.TControl.
Moreover, shared libraries that are to use VCL components (or any Delphi components for that matter) should be compiled as packages, not plain DLL projects.
For more information about the platform affinity of data modules, see:
DataSnap Client Module Wizard Sets Password Field to UserName
The 'Password' property in a DataSnap REST Client (or a DataSnap Client) takes the value of the 'User Name' property when the project is generated. Any 'Password' you enter in the wizard is lost. After the client is created, you should set the 'Password' in the Object Inspector.
Automation Servers and Unsigned Integers
With XE2, Delphi introduced support for dispatching Word, LongWord and UInt64 parameters as unsigned integers (that is, VT_UI2, VT_UI4, VT_UI8 respectively). And for historical reasons, TOleEnum is a LongWord alias, and the Delphi Type Library importer declares enumerations as unsigned. The net result is that enumerations are dispatched as VT_UI4. Servers such as MS-Excel, however, do not process enumerations when dispatched as unsigned. Thus, the following might fail:
V.Insert(TOLEEnum(xlShiftDown)); // Insert in Range
To workaround the failure without rolling back automation support for unsigned integers, Update 4 introduces a global variable, System.Variants.DispatchUnsignedAsSigned, that can be used to instruct the run time to send unsigned values as signed integers.
Here is an example of how it can be set:
{$IF CompilerVersion >= 23}
{$IF DECLARED(System.Variants.DispatchUnsignedAsSigned)}
System.Variants.DispatchUnsignedAsSigned := True;
{$IFEND}
{$IFEND}
You can put the above in the initialization section of one of the units of your Automation Client.
NOTE: The above only affects Variant- and DispInterface-based automation. That is, automation calls via vtable/interface are unaffected by the failure and workaround described here.
See Also
- Installation Notes for XE2
- Release Notes for XE2, including Update 1
- Release Notes for XE2 Update 2
- Release Notes for XE2 Update 3
Copyright 2012 Embarcadero Technologies. All rights reserved.