What's New - RAD Studio (original) (raw)

Go Up to Main Page

Go Up to What Was New in Past Releases

Note:

The RAD Studio 11 Alexandria release contains the following new and improved features:

Contents

New IDE Enhancements

High DPI IDE

The Delphi, C++Builder, and RAD Studio IDE are now high-DPI enabled. Running with high DPI enabled is currently a runtime option. All windows in the IDE now support high DPI. This includes behavior such as changing scale when being dragged from one monitor to another. IDE functionality refers to:

The IDE styles (Light, Dark, and Mountain Mist) have been updated to support high DPI as well.

High DPI for the VCL Form Designer

In RAD Studio 11, the VCL form designer can handle scaling three different ways. You can customize this inside Tools > Options > User Interface > Form Designer > High DPI. The options available are Automatic (Screen PPI), Low DPI (96 PPI), and User Editable when you can set a specific PPI value.

High DPI for the FMX Form Designer

The FireMonkey designer scales a form the same way a FMX form does at runtime. Coordinates remain the same (that is, a button placed at (20, 20) will be at (20, 20) no matter the high DPI scaling of the monitor the FMX designer is on.) It is a visual scaling only.

Welcome Page

A new VCL-based Welcome Page has been added to the IDE. It is designed to:

Open Tools API Changes

All APIs that pass images, such as the splash screen services, about box, IDE Insight, and other areas have been updated to support high DPI images. This allows you to pass in multiple resolutions of the same icon, which are added to the internal image collection and used with a virtual image list. Although the methods take an array of any TGraphic, we recommend PNG images.

VCL Styles in the Designer

VCL controls can be optionally rendered using styles in the designer.

Warning: This feature is not enabled by default and can be turned on in the Tools Options dialog, User Interface > Form designer section. The option name is “Enable VCL Styles”.

The StyleName property editor reflects the available styles in the project, and renders a preview (how a button looks). Remember that if you select “Windows” it means platform styling and if you leave the property empty, it is going to use the parent control (or parent form) style.

Notice that the VCL form designer now has a custom Windows 10-style title bar and frame, rather than using the classic Windows frame. If no form style is set, it uses a Windows 10 style. If the form is set to use a VCL style, the frame reflects the selected style of the form.

Form Designing and Code Editing

In 10.4.2, the Design tab was disabled when a form was being designed in another window. Now, the tab is always enabled, but if it is being designed in another window a message is displayed; you can click a button to bring the designer to the current window.

Options Dialog Performance

The Options dialogs (both IDE and Project Options) should load in a fraction of the time of previous releases. In the past, all pages were loaded when the dialog opened; now, a page is loaded (and controls created) only when it needs to be shown.

Third party vendors should be aware of this change for impact on their settings frames.

FireMonkey Design Guidelines and Margins

The FireMonkey designer in version 11 is introducing guidelines and other features found in the VCL designer, with a different implementation. Components hints are displayed when you are moving or resizing them. Also, controls offer guidelines for alignment on the sides and display standard margins distance with a line across.

The form and component resize controls now have the same look and feel as the VCL form designer.

DelphiLSP for Visual Studio Code and Other Editors

In RAD Studio 11 DelphiLSP can be used with other editors. As part of this, we have created a Visual Studio Code extension using DelphiLSP.

To know more about this feature, see here.

Code Insight (DelphiLSP) Improvements

DelphiLSP

LSP in RAD Studio 11.0 focuses on quality and ensures it is a robust replacement for classic Code Insight. Key improvements include being able to parse units that have include files included in them; improvements around when the server is restarted; and improvements to the syntax elements the server understands.

Classic Code Completion Removed

Delphi classic code completion has been removed from the IDE. Only the LSP option is available for Delphi Code Insight.

Warning for Build Events

Build events can execute arbitrary commands on your system. It is common to get projects, which include build events, from third parties online. RAD Studio now warns when a project contains a build event in any configuration (including one you are not currently building.)

Warning: It is possible to mark a project as trusted, get a newer modified version and not be warned even if it contains a build event it did not before. This is a security mitigation intended to assist you, but must not be taken as fully preventative in all situations.

Other IDE Changes

The code editor now uses Consolas as the default font. A number of other common coding fonts, such as Fira Code, are installed with the IDE. Note that the editor does not support ligatures, but it does render high DPI text crisply using these new fonts. ‘View Messages’ has been restored to the editor context menu.

The Code Insight progress bar is hidden once work is completed.

Delphi ToolChain Improvements

New macOS ARM 64-bit Target Platform

RAD Studio 11 supports a new Delphi target platform, macOS ARM 64-bit, to natively target the new M1 Apple Silicon CPUs with macOS 11. You can use this platform to build native M1 applications (of course this requires M1 hardware to run). We keep our Intel 64-bit target support and the creation of Universal Binary applications including both ARM and Intel binaries in a single package.

Universal binaries

You can create a universal binary containing both Intel and ARM code. To do so, ensure the target platform is macOS ARM 64-bit. In the Project Options (ensuring macOS ARM 64-bit is the current target) navigate to Building > Delphi Compiler > Compiling > Other, and check ‘Generate macOS universal binary file (x86_64 + arm64)’. Make sure you deploy the application, you can find the universal binary file under the OSXARM64\Debug folder.

MacOS Deprecations

In the RAD Studio 11 release, Macapi.QTKit unit is deprecated on macOS/X64, and it’s removed from macOS/Arm64 library. We also removed the "Macapi.Quicktime" unit from the product for both the macOS/X64 and the Arm64 libraries.

Binary Literals and Digit Separator

The Delphi language in Olympus adds support for binary literals, in addition to decimal and hexadecimal ones. A binary literal uses the % symbol as a prefix (the same syntax used by other Pascal compilers):

const Four = %100; var x: Integer; begin x := %1001001;

The language also introduces a digit separator that can be used to improve the readability of literal values with many digits. The separator is the underscore “_” and it is basically ignored when parsing and compiling the code. This is very similar to the feature introduced in C# 7.0.

const AMillion = 1_000_000;

Of course, you can use the digit separators for binary literals.

Inline assembler support for AVX instructions (AVX-512)

We have introduced support for asm code for newer sets of instructions, including AVX2 (ymm) and AVX512 (zmm).

C++ ToolChain Improvements

New C++ Code Formatter

The code formatter technology used for C++ has been completely replaced. Code formatting now uses clang-format. The new formatter options for C++ are found in Language > C++ > Formatting. You can always format code manually, but you can also have the IDE automatically format your code when you save, or even as you type. These last two are controlled by the ‘Auto formatting’ setting. Set it to format on save, or format on newline.

The IDE will use format settings specified by a .clang-format file in the source folder, a common C++ project convention. If one is not found, it will use whatever format you choose in the Options dialog (above), where the default is the Embarcadero recommended formatting.

C++ / Delphi Compatibility

We now have C++-compatible RTTI available for Delphi types; you can use make_shared on a Delphi type, and there are type conversions to assist in using Delphi types in C++.

C++-compatible RTTI for Delphi types

In the past, C++ type information was not available for Delphi types; that is, accessing the result of typeid(delphi-type) where delphi-type is a type that comes from Pascal code, or is a Delphi-style class in C++, would result in an AV. Note that typeid returns a std::typeinfo for a type simply, or if it’s a polymorphic type for the most-derived type of that instance.

typeid() now returns a std::typeinfo, and C++-compatible RTTI is generated for Delphi types.

Using smart pointers with Delphi classes

You can now use both std::make_unique and std::make_shared on a Delphi-style class (one defined in Delphi, or in C++ but inherited from one defined in Delphi.)

Type conversions

The RTL now includes helper methods for type conversions between Delphi types and C++ (and Delphi) strings. This includes conversions from TDateTime to string types, as well as being able to easily convert (assign) from a C++ string to a Delphi string, and use std::string_view on a Delphi string. Type conversions to and from strings There are now to_string() and from_string() methods for many types to convert to and from strings (UnicodeString, WideString and AnsiString, including templated by codepage). These methods exist for the following types:

Other

VCL and FireMonkey Changes

In RAD Studio 11 we have done a large collection of small improvements to the VCL library, focused on removing some remaining XP legacy and inconsistencies with Windows 10 and improving core library features.

TRichEdit Component updated to RichEdit 4.1 (MSFTEDIT.dll)

We updated the implementation of the VCL TRichEdit component to support a more recent version of the platform control. Additionally, TDBRichEdit.Lines is now a public property. RichEdit URL detection has new features like EnableURLs, ShowURLHint and SetSelTextToFriendlyURL.

Some changes were made to the RichEdit Text Attributes, it now has additional properties like BackColor, Disabled, Hidden, Link, Offset, RevAuthor and Subscript.

TParaAttributes has also new types cpaAlignment, cpaNumbering, cpaFirstIndent, cpaLeftIndent, cpaRightIndent, and cpaTabStops. Also it has a new property, ConsistentAttributes.

Finally TCustomRichEdit now has a new public method, RenderRange.

VCL Modernization Work

New Default Font

For VCL applications, the default font is now Segoe UI 9. The title font of the VCL styles is getting adapted to the same default font.

Memo and RichEdit Margins

New property in TCustomMemo, published in TMemo, TDBMemo, TRichEdit, TDBRichEdit.

Radiogroup without frame

In TCustomGroupBox we have this public property published in TGroupBox, that contains ShowFrame, HeaderFont and DefaultHeaderFont.

There are two new properties in TCustomComboBox and descendants (public in the TCustomComboBox class, published in the TComboBox class) that are DropDownWidth and AutoDropDownWidth.

TTreeView support for CheckBoxes

Now TTreeView defines new properties that support CheckBoxes. You can read more about this here.

TWICImage multi frame support

TWICImage multi frame support, there are 2 new properties in type TWICImage defined as FrameCount and FrameIndex. These two properties together allow you to read all valid frames in a multi-frame image file.

New TLabelDBEdit component

There is now a data-aware version of the TLabeldEdit VCL control. To implement it, the hierarchy of the related controls has changed:

Additionally, RAD Studio 11 adds support for the TLabeledEdit control in the TFlowPanel and TGridPanel containers.

Error Messages improvements

Coolbar Chevron support

Coolbar has Chevron support via a new Boolean property ShowChevron.

NumberBox

The TNumberBox class introduced in 10.4.2 has a few additional features:

Threading safety improvement

In general, UI controls should be created in the main UI thread. If you create a VCL control in a background thread, the behavior is undefined and can lead to fairly obscure access violations.

For this reason, there is a new class property: TControl.RaiseOnNonMainThreadUsage

When this property is True, the VCL will raise an exception in case a TWinControl window handle is created in a thread that’s not the main thread. This prevents issues when this is done by accident. In COM scenarios and other cases, the creation of a handle in a secondary thread might be legitimate and so it remains allowed.

VCL StyleUtils.inc converted to a regular unit

The include file StyleUtils.inc has been converted to a regular unit, allowing developers (and component vendors) to better integrate their code with VCL styles support. The previous include file, in fact, defined private types generally impossible to modify and extend, unlike the new unit.

Attention: While we agreed to move the code to a unit, making some data types public and accessible, we reserve the right to make changes to this style API and cannot guarantee the same level of compatibility with external code that the VCL and RTL libraries generally provide.

Smaller Changes

FireMonkey

For FireMonkey we have focused on some core refactoring, with particular focus on desktop and Windows in particular. Now platform services for macOS and Windows refactored into separate units, extended IFMXMultiDisplayService and TDisplay, extracted all metrics related services into FMX.Platform.Metrics, constraints size for forms, and refactoring of:

TWebBrowser component for Windows extended with support for Chromium Edge via the platform WebView 2 component, similarly to the existing VCL TWebBrowser support. You can pick the browser engine using the new WindowsEngine property of TWebBrowser.

Google Play Billing Library Version 4

RAD Studio 11 offers support for the latest version of Google’s Billing API, an update that’s becoming mandatory later this year for Play Store apps (the final deadline is November ‘21). The new API is integrated seamlessly with the FMX library and your code should adapt easily to the new API.

Android 30 API support

Android API 30 support includes the following changes

Also, for Android, RAD Studio now supports the “multidex” feature (which allows your app to generate multiple “classes.dex” files) and uses the newer “D8” DEX compiler instead of the old “DX” one to compile Java bytecode into DEX one. The new releases include a different set of Java libraries and this makes old projects incompatible. When you open an Android project build with an older version of RAD Studio you need to:

Additional Improvements

RTL and Data

There are many improvements in the core RAD Studio libraries. Here we are providing a summary of the key changes across RTL, FireDAC, HTTP and REST client libraries and more.

Platform Identifiers

RTL adds a new platform identifier, pidOSXArm64 for the macOS/Arm64 platform. The existing pidAndroid32Arm and pidAndroid64Arm identifiers are replaced by the new pidAndroidArm32 and pidAndroidArm64. Now, all platform related identifiers use the same format and order of the compilers:

RTL: TZipFile

We have focused on ZIP files (that is, the TZipFile class of the RTL) quality, improvements, and optimizations. We added support for Zip64 and a method to remove a file in TZipFile. Also, TZipHeader has a GetFIleName method, TZipFile.IsValid() accepts a stream parameter and System.Zip works with files larger in size than 4 GB.

RTL large data structures improvements

We have made a few improvements in the use of proper data types for larger memory structures under 64-bit compilers. For example, TMemoryStream in 64-bit supports data structures larger than 2 GB. Related to this, we added the new method TThread.GetTickCount64 (while the existing TThread.GetTickCount, returning a 32-bit value, remains in the RTL for compatibility).

New Record Helpers

There is a new record helper for TDateTime, which includes a “UTC Now” function (not available in the original Date RTL), actually called NowUTC. This release also introduces a helper for the TCurrency data type in Delphi, TCurrencyHelper, similar to the TDoubleHelper.

Bluetooth and BLE Improvements

Improvements in this area include both classic Bluetooth and Bluetooth LE and most platforms, with particular focus on Windows 10 and Android (but also iOS and macOS). Improvements also include Beacons support.

Additional RTL Enhancements

Generic Collections Improvements

When using multiple generic types, some generic collections used to have TKey and TValue as symbolic names for the generic types. Now this is confusing as TValue is a specific type in the RTL. To avoid any confusion the symbolic names have been changed. There is no effect to existing code, as the symbolic names are replaced with concrete types when the generic types are instantiated. Additionally, there are few additional constructors for collection classes, that take as parameters an array of values, including:

procedure DoCheckStateChanged(Node: TTreeNode; CheckState: TNodeCheckState); virtual; constructor TList.Create(const Values: array of T); constructor TDictionary<TKey, TValue>.Create(const AItems: array of TPair<TKey, TValue>);

The implementation of TDictionary Capacity, GrowThreshold and hashing has been improved, with a better balance of performance / memory usage / minimal collisions. The internal implementation class TListHelper has been removed in favor of using a strongly typed field TArray, updating all related streaming and data mapping code.

RTTI

Open array support to RTTI: allows invoking methods with an open array parameter via RTTI and also supports open array arguments in TVirtualMethodInterceptor. TValue adds specific support for TDateTime. Also, TValue and Variant type interchange has been improved.

PPL

Made the PPL Thread pool statistics easier to access, that means, TThreadPoolStats.Get method is now public

Streams

New TPointerStream class, allows reading and writing in-memory data using the TStream interface, by indicating a pointer location and a size. TStream.CopyFrom doesn’t require the size, which might be unknown. The method has also been optimized when Count is large (up to 400% improvement).

Dates to String Conversion

Dates to strings and reverse conversions have been improved. Worth to note, that now StrToDate strictly follows ‘to date’ format string, supports date formats with month and day names, and supports date formats with arbitrary text inside. Also improves TFormatSettings date/time related properties initialization and unifies the representation on all platforms.

Create a Interface Instance

There is a new System.Generics.Defaults._MakeInterfaceInstance that allows creating an interface instance, where all interface methods are represented by anonymous methods.

TNoRefCountObject

The new class System.TNoRefCountObject is a non-reference-counted IInterface implementation (replacing the old and oddly named TSingletonObject)

Optimizations and Other

Improved the performance of:

The TGUID data structure is now defined only in System.pas

JSON

UTF8ToString Changes

The UTF8ToString overload that accepts an array of AnsiChar has been removed and UTF8ToString(array of Byte) deprecated. The removed function is:UTF8ToString(const S: _PAnsiChr.

Please see System.UTF8ToString for workarounds.

FireDAC

Internet, HTTP and REST Client Libraries

Internet Server Technologies

WebBroker

ISAPI DLL threads have a configurable StackSize, using the variable Web.Win.ISAPIThreadPool.StackSize. Significantly improved WebBroker performance when sending/streaming files larger than 2 GB (MaxInt).

RAD Server

Multipart/form-data support for RAD Server

DataSnap

DataSnap: The REST URI is now configurable using a new mechanism, based on a TDSMethodMapEvent event

Installer Changes

RAD Studio 11 installer has several changes worth noticing:

See Also