What's New in Carpathia Beta 1


Contents of Beta 1:


System Requirements

New Features to Test in Beta 1

Known Issues in Beta 1



Thank you for joining the Carpathia Beta program.

Carpathia is the next major version of RAD Studio, Delphi, and C++Builder.

We encourage you to focus on the new feature areas listed below, as well as testing the areas of the product that you regularly use. We hope you are as excited about Carpathia as we are, and we look forward to hearing what you think.

- Embarcadero RAD Studio Product Management

System Requirements

·         Disk Space Requirement:  Installing the Beta can require 45 GB of free disk space (to download the Web media kit and install the product).


New Features to Test in Carpathia Beta 1

Multi-Device Designer

The multi-device designer lets you build one UI that runs on several form factors. 

·         To get started, File | New | Multi-Device Project.

·         Select a UI template, such as Tabbed application.

·         In Design view, you will see your master view, where most of your UI design will happen.

·         Use the Platform Selector to select a platform view, such as iPhone 4” in portrait mode. When you switch devices, your views are shown in the target form factor device.

·         Use the Platform Selector to select a platform view, such as Android 4” in landscape mode. Switching to another platform updates the layout of UI correctly for that platform style. Notice the tabs are now on the top for Android.

·         Sometimes you may want to fine-tune your form for a particular device or form factor. In this case we will create a specific view.  In the Android 4” view, add another tab item. This tab item will only be visible on this view and for this device form factor.

·         If you want to modify all of your specific views with the same change, make the change in the Master view.  For example, change the icon on the first tab item in the Master view.  The change stays with the Master form as it updates the UI for each device.  Switch to the iPhone 4” and Android 4” views to see the icon change in all the views.


FireMonkey TMultiView component

·         The TMultiView component has the ability to show controls as a panel, drop down, or drawer based on a property.

Device Type





Drawer (push/overlap)


Drawer (push/overlap)



Docked Panel


Drawer (push/overlap)





·         Sliding speed

·         Mode (Overlap/Push)

·         Placement (Left/Right)

·         Touch Area Size

·         Appearance speed

·         Height

·         Style Lookup

·         Placement (Left/Right)

·         Color

·         Enabled

·         Opacity


FireMonkey TDetailPanel component

·         Drop a TDetailPanel component on your application form to set up a master/detail relationship between a TMultiView component (master) and a TDetailPanel component (detail).

·         In the DetailControl property of the MultiView component, specify the DetailComponent.

FireMonkey MultiMonitor support

MultiMonitor support allows FireMonkey applications to be displayed on multiple monitors. See the global object Screen (class TScreen in module FMX.Forms) and its methods and properties.  You can simply change the coordinates of the form to place it on the appropriate monitor.  This MultiMonitor feature is supported on Windows and OS X.  On Android and iOS, you cannot change the coordinates of forms.  However, information relating to the monitors should be correct.

    function Size: TSize;

    property Height: integer read GetHeight;

    property Width: integer read GetWidth;

    function MultiDisplaySupported: Boolean;

    procedure UpdateDisplayInformation;

    property DisplayCount: Integer read GetDisplayCount;

    property Displays[const Index: Integer]: TDisplay read GetDisplay;

    function DisplayFromPoint(const Point: TPoint): TDisplay; overload;

    function DisplayFromPoint(const Point: TPointF): TDisplay; overload;

    function DisplayFromRect(const Rect: TRect): TDisplay; overload;

    function DisplayFromRect(const Rect: TRectF): TDisplay; overload;

    function DisplayFromForm(const Form: TCommonCustomForm): TDisplay;

    property DesktopRect: TRect read GetDesktopRect;

    property DesktopTop: Integer read GetDesktopTop;

    property DesktopLeft: Integer read GetDesktopLeft;

    property DesktopHeight: Integer read GetDesktopHeight;

    property DesktopWidth: Integer read GetDesktopWidth;

    property WorkAreaRect: TRect read GetWorkAreaRect;

    property WorkAreaHeight: Integer read GetWorkAreaHeight;

    property WorkAreaLeft: Integer read GetWorkAreaLeft;

    property WorkAreaTop: Integer read GetWorkAreaTop;

    property WorkAreaWidth: Integer read GetWorkAreaWidth;


FireMonkey Support for Immersive Full-Screen Mode of KitKat

Immersive full-screen mode hides the navigation and status bars and lets your app capture all touch events on the screen.  When immersive full-screen mode is enabled, your activity continues to receive all touch events.  The user can reveal the system bars with an inward swipe along the region where the system bars normally appear.  For more details, see https://developer.android.com/training/system-ui/immersive.html.

·         In regular mode on a KitKat device, the soft navigation keys will be visible, and the status bar at the top can be made visible by setting Form.BorderStyle to any value except for TFmxFormBorderStyle.None.

·         To enable Full-Screen Immersive Mode, set the Form FullScreen property to True

·         In Full-Screen Immersive Mode, Form.BorderStyle always works as if it was set to None, and the soft navigation keys will be hidden.


FireMonkey TListView Pull to Refresh for iOS and Android

TListView Pull to Refresh allows a user to pull down a list to refresh the contents.

·         Set ListView PullToRefresh property to True.

·         Define the OnPullRefresh event for your ListView component.  For example:

procedure TForm1.ListView1PullRefresh(Sender: TObject);
    Item: TListViewItem;
    Item := ListView1.Items.Insert(0);
    Item.Text :=  GetRandomText;
    Item.Height := 56;
    if ListView1.Items.Count > TotalListItems then
      ListView1.Items.Delete(ListView1.Items.Count - 1); 


FireMonkey Advertising support

·         The FireMonkey TBannerAd component now uses the Google Mobile Ads API from Google Play Services.


Size property of FireMonkey components

·         FireMonkey visual components now have a Size property which stores a new TControlSize object.

·         Width and Height properties set the data elements of the TControlSize object and the old private fields for FWidth and FHeight have been removed.

·         Size property has a new sub-property for setting a Platform Default Size. 


FireMonkey MediaLibrary support for editing images in ImagePicker on iOS and Android

The mechanism for editing images in the ImagePicker can be enabled by setting the Editable property to True in TTakePhotoFromLibraryAction or TTakePhotoFromCameraAction.


FireMonkey OnSaveState

An "OnSaveState" event has been added to TCommonCustomForm, which is sent when the state should be saved. You may choose to save the state (e.g. to database or elsewhere) or store the data to TCommonCustomForm.SaveState.Stream, which will later be restored once application is restarted. 

The problem is that on mobile platforms such as Android, an activity may be killed arbitrarily by the OS either when memory is low or at some other time.  This can easily be tested if you enable "Don't keep activities" option on Android device inside "Developer Options".  After this, just navigate away from application and get back to it - it will be restarted. 

To solve the aforementioned problem, Android provides a "SaveState" memory block, where it will keep a persistent state that you saved and then hand it back to you when the application is restarted.  Note that this allows saving only "transient" state - if you manually shut down application or from within task manager and then restart it - the previous "transient" state will be lost. 

This feature implements a mechanism both for Android transient "SaveState" mechanism and persistent save state by storing data on disk.  On non-Android platforms, it emulates a transient SaveState by saving files in temporary locations, while storing persistent state in desired location.

The conditions for this feature are:


·         If SaveState.StoragePath is empty (default), the saved state is transient and will either use OS-provided facilities (such as "SaveState" on Android) or a temporary file location.

·         If SaveState.StoragePath is not empty (e.g. it is set to TPath.GetHomePath), then the saved state is persistent and will be saved to disk at that location.

·         For both transient and persistent states, it is recommended to set SaveState.Name to a desired entry name (or file name, if it is on disk).  If left empty, the form will use application name + class name + form name combination.

·         SaveState.Stream will contain data that was saved there last time during (or before) OnSaveState event.

o   This data can be accessed at any time, but typically you can read it during OnCreate event and write to it during OnSaveState.

o   If this data is left untouched during execution, it will stay this way and you can still recover information from it until you explicitly clear this data by using SaveState.Stream.Clear.

o   If the data was cleared using SaveState.Stream.Clear, it will either be removed from transient storage; if the data was saved previously to file, such file will be deleted.


A simple example using this special storage:


procedure TForm1.FormCreate(Sender: TObject);
  R: TBinaryReader;
  if SaveState.Stream.Size > 0 then
    // Recover previously typed text in Edit1 control.
    R := TBinaryReader.Create(SaveState.Stream);
      Edit1.Text := R.ReadString;
procedure TForm1.FormSaveState(Sender: TObject);
  W: TBinaryWriter;
  // Save typed text in Edit1 control.
  W := TBinaryWriter.Create(SaveState.Stream);

In the above code snippet, Edit1 will continue to have its text even if application is restarted. In this example, if you add this line of code at the beginning of the form create event (make sure System.IOUtils.pas is in the USES list):


  SaveState.StoragePath := TPath.GetHomePath;

Then, it will use the persistent storage type.  On Android, it will use the application's bundle, while on Windows it will use AppData / Roaming folder. 

This feature can also be accessed globally, without resorting to TCommonCustomForm's mechanism. You can request IFMXSaveStateService from platform and use its methods to save/load some global chunk of data.


FireMonkey TWebBrowser Methods

New methods have been added to TWebBrowser:

·         EnableCaching – when set to False, if the file is updated and you try to reload it, the page will be updated.

·         Stop – to cancel the loading of a web page.

·         CaptureBitmap – will capture the currently visible web page as a bitmap.  The purpose of this feature is to allow you to hide the WebBrowser control, display the bitmap and overlay other components (such as buttons or popups) on top of the bitmap.


Debugger Enhancements

·         Support for filenames with international characters has been added for iOS debugging.

·         Support for UTF8, UTF16 and UTF32 has been added for iOS and Android debugging.

·         Applications run and can be debugged on devices running iOS 8 Beta 2.


Delphi Compiler Enhancements

·         String-like operations on Dynamic Arrays

o   B := [1, 2, 3, 4];

o   B := B + [5, 6, 7];

o   Insert([6, 7, 8], B, 5); // inserts array [6, 7, 8], into B at index 5

o   Delete(B, 1, 3); // deletes 3 elements starting at index 1

o   Concat([1,2,3,4],[5,6,7])

o   var B: TBytes = [1, 2, 3, 4];

·         Improved initialization for Dynamic Arrays

o   B := [1, 2, 3, 4];

o   B := B + [5, 6, 7];

·         An array constructor can be used to specify an initial value of a global dynamic array variable:

  TBytes = array of Byte;
  TBytesArray = array of TBytes;
  TStrDA = array of string;
  Sabc = 'abc';
  Sdef = 'def';
  B: TBytes = [1, 2, 3, 4];
  C: TBytesArray = [[1, 2, 3], [4,5,6]];
  D: TStrDA = ['ABC', 'DEF'];
  E: TStrDA = [ Sabc, Sdef ];

·         Generics container optimizations.

o   IsConstValue(Expr) standard procedure will generate efficient code when expanding an inline function.  For example:

function IsConstValue(Expr): Boolean;
// IsConstValue(SizeOf(T)) may be built by result of inline function expansion.
  TFoo<T> = class
    function GetSize: Integer; inline;
    procedure Move(Dest, Source: Pointer; Count: Integer; ElemSize: Integer); inline;
    procedure Test;
function TFoo<T>.GetSize: Integer;
  Result := SizeOf(T);
procedure TFoo<T>.Move(Dest, Source: Pointer; Count: Integer; ElemSize: Integer);
  WriteLn('ElemSize = ', ElemSize);
  if IsConstValue(ElemSize) then
    WriteLn('ElemSize is const')
    WriteLn('ElemSize is not const');
procedure TFoo<T>.Test;
  X, Y: Pointer;
  Count: Integer;
  X := nil;
  Y := nil;
  Count := 1;
  Move(X, Y, Count, GetSize);
  F: TFoo<Integer>;
  F := TFoo<Integer>.Create;


o   The following standard functions will generate efficient code when expanding generic methods:

function IsManagedType(TypeID): Boolean;
function HasWeakRef(TypeID): Boolean;
function GetTypeKind(TypeID): Integer;


FireDAC Enhancements

·         New IBLite Driver for desktop and mobile deployment

·         Support for Blob real streaming, without buffering on client side.  This includes the ability 
for an application to get an internal stream reference.  For example:

FDQuery.SQL.Text := 'select :p = BLOBField from tab where id = :id';
[0].DataType := ftStream;
FDQuery.Params[0].StreamMode := smOpenRead;
[1].AsInteger := 123;
// TFDParam.AsStream returns reference to internal low-level stream
[0].AsStream.Read(Buffer, Length(Buffer));

·         Support for MSSQL file streams.

·         TFDSchemaAdapter has been extended to support advanced serialization and delta processing:

o   To serialize several datasets related to each other on the server side.

o   To send the delta for these datasets from client to server.

o   To load and store the delta on the server side inside of the datasets without opening / executing the queries.

o   To apply the delta on the server side in the chronological order of the changes.

·         Support for DBMS API command native timeouts.

·          FireDAC connection parameters are now displayed in the Object Inspector as a record.


DataExplorer Enhancements

·         Primary keys and their fields are now displayed.

·         Foreign keys and their fields are now displayed.

·         Sequences / Generators are now displayed.


Delphi RTL Enhancements

·         Added System.NetEncoding unit in RTL.  This unit provides a new TNetEncoding class to unify all internet encoding/decoding:


o   This replaces EncodeStringDecodeString, EncodeBase64, DecodeBase64, HTTPEncode, HTTPDecode, HTMLEncode, HTMLDecode...and the AnsiString versions which are now deprecated.

·         Updated Zlib library version to 1.2.8.

·         OmniXML is included as a new provider for the XML framework.


C++ Compiler Enhancements

·        For C++ projects, Carpathia provides a Find/Navigate To command available on the context menu in the Code Editor.  The Navigate To command searches the entire active project for identifiers and constants that meet the specified search criteria.


Known Issues in Beta 1

·         FireMonkey applications in this Beta release are not running properly on the Android L Beta.  This issue will be resolved in a future Carpathia Beta release.

·         Compiling a Delphi app for iOS after compiling a Delphi app for Android will crash the IDE in this beta build.   We are investigating a fix. (52054)

·         C++ applications targeting OS X are failing at compile time with an error in this beta build:  E2209 Unable to open include file 'fmx.h.  To work around this error, add $BDS\include\osx\fmx to your include path. (52378)