Watch, Follow, &
Connect with Us

Embarcadero Blogs

Latest Posts


Using TImageList in your Multi-Device Applications

TImageList is a new FireMonkey component in RAD Studio XE8. Image lists can be used as centralized collections of images with many different UI controls such as menus, lists and more. TImageList has built-in support for multiple resolutions to ensure your application icons and images appear correctly on different device form factors, resolutions and platforms.

I created a small Restaurant Menu demo application that shows how to use TImageList with the TListView component.

In this example, TListView is bound into some sample data that I loaded to the FDMemTable component. The ImageList component is selected on the Images property for TListView. The ImageIndex field in the data set is bound into TListView’s ImageIndex property.

As you can see in the snippet below, ImageIndex="0" correlates with ‘Burgers’ in my list.

<RowList><Row RowID="0" RowState="Unchanged">
<Original FoodItemName="Burgers" ImageIndex="0"/>

ImageList

To find out more about TImageList, have a look at these resources:

Below is a screenshot of my application running on Windows with the new ‘Radiant’ premium FireMonkey style for RAD Studio XE8.

You can download my sample application here.

ImageListApp

 

Want to learn more about the great new features in Delphi, C++Builder and RAD Studio XE8?

Download a free trial here and click on the banner below to sign up for our new Developer Skill Sprint series, starting next Tuesday, April 21st, 2015.

Skill Sprints


posted @ Fri, 17 Apr 2015 20:49:32 +0000 by sarinadupont


Working with TMapView on iOS and Android with RAD Studio XE8

The new maps component in RAD Studio XE8 makes it easy to add mapping functionality to your mobile applications. TMapView provides access to map APIs for iOS and Android. On Android, it uses the Google Maps Android API and on iOS, it uses the Map Kit Framework.

The key features of the TMapView component are:

  • Four Types of Maps: Normal, Satellite, Hybrid and Terrain (Android only) 
  • Gesture Control: Intuitive tilt, rotate and zoom gesture controls
  • Control the Map View: Ability to control the map properties such as the map center coordinates, the map orientation and so on
  • Custom markers: Ability to add markers to the maps

If you are using TMapView on Android, you will need to obtain a Google Maps API key.

 

RAD Studio XE8 ships with two maps sample applications for Object Pascal and C++.

Object Pascal:

  • C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\Device Sensors and Services\Maps
  • C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\Device Sensors and Services\Map Type Selector 

C++:

  • C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\CPP\Mobile Samples\Device Sensors and Services\Maps
  • C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\CPP\Mobile Samples\Device Sensors and Services\Map Type Selector 

I created a small demo project that uses the Spitcast REST API, REST component framework, FDMemTable and TMapView to display surf locations on my map based on the longitude, latitude and spot name information returned from the REST service. A custom marker graphic in the shape of a surfboard fin is used to indicate the locations on the map. 

You can download my demo project here. 

Here is a code snippet from the demo project:

procedure TForm26.FormCreate(Sender: TObject);
var
  LongitudeField: TField;
  LatitudeField: TField;
  MyLocation: TMapCoordinate;
  Descr: TMapMarkerDescriptor;
  SpotName : TField;
begin
  RESTRequest1.Execute;
begin
  LongitudeField := FDMemtable1.FieldByName('longitude');
  LatitudeField := FDMemtable1.FieldByName('latitude');
  SpotName := FDMemTable1.FieldByName('spot_name');
  FDMemTable1.First;
   while not FDMemTable1.EOF do
    begin
      MyLocation := TMapCoordinate.Create(StrToFloat(LatitudeField.AsWideString),StrToFloat(LongitudeField.AsWideString));
      MapView1.Location :=  MyLocation;
      Descr := TMapMarkerDescriptor.Create(MyLocation, SpotName.AsWideString);
      Descr.Icon := BitmapSource.Bitmap;
      BitmapSource.Visible := True;
      Descr.Draggable := True;
      MapView1.AddMarker(Descr);
      MapView1.Zoom := 8;
      FDMemTable1.Next;
  end;
end;
end;

Here is the app running on my iPad:

 


posted @ Thu, 16 Apr 2015 17:15:07 +0000 by sarinadupont


Developer Skill Sprints - New Series Starts Next Week!

Here's an invitation to register for the new series of RAD Studio, Delphi and C++Builder Developer Skill Sprints. This is a great opportunity to build your development skills in just a short amount of time.


posted @ Thu, 16 Apr 2015 11:25:00 +0000 by Tim Del Chiaro


Создание нативных представлений для iOS. TSpinBox и UIStepper. Часть 3

Продолжим рассмотрение нового подхода разработки (1 часть, 2 часть) и в этой статье рассмотрим использование нативных контролов на базе механизма презентаций для iOS. В качестве примера мы превратим TSpinBox в нативный для iOS.

Полная статья доступна здесь


posted @ Wed, 15 Apr 2015 12:25:28 +0000 by Yaroslav Brovin


What to do with Beacons before you code?

A beacon is a Bluetooth Low Energy device including some information in its advertising data.

Working with beacons requires code to read the beacons and some setup to ensure you read only the right beacons, especially as more and more are appearing! This article mainly focuses on the latter and what you should be aware of before you deploy your beacons.

Programming for iBeacons & AltBeacons

While you can code to work with beacons via a number of languages, RAD Studio XE8 has introduces a new multi-platform component for working with beacons – as covered in this post from Sarina DuPont – this is very cool making it super easy to have both Android and iOS and Mac applications running from common code. However this is out of the scope of this post.

I will however point you to the sample projects shipped with RAD Studio XE8 using both Delphi and C++ in the following samples folder which can be opened directly using the shortcut to the samples in the IDE.

There is also great detail about what beacons are in DocWiki

<Samples>\<language>\Mobile Samples\Device Sensors and Services\Bluetooth\Beacons

Getting started with Beacon Hardware

So what do I need to know about beacons?

Beacon Standards

Firstly, beacons are typically following 2 standards for broadcasting over Bluetooth 4.

iBeacons from Apple (and requires a license if you want to create physical beacons yourself)
AltBeacons which is an open standard

Alt Beacon
iBeacon

Using these standards you can pick up data to identify a specific beacon and how far it is away. The 4 key bits of information to manage this are

UUID
Major ID
Minor ID
TxPower

Using the new Beacons component you can define which type of beacon(s) you want to scan for using the UUID as a filter, and optionally Major and Minor ID – and this brings us onto the importance of the UUID

Beacon Regions

Beacon UUID

By default the UUID is set based on the beacon manufacturer. If you are going to use beacons in a real world application then you will probably want to update the UUID to a unique ID that you will be scanning for. This way you can limit any other beacons that are deployed.

Beacon Major and Minor

Beacon Major and Minor ID’s are used to identify the specific location you want to indicate with the Beacon. Hence its important that you update the UUID so you read only the correct beacons to check for the location you are at.

An example would be using the major to identify a retail store and a minor to a specific area in the retail store.

Programming the Beacon

There are a number of beacon manufacturers out there, and its typically easy to re-program your beacon to have that unique UUID and then set the Major and Minor ID’s.

Once such beacon is the RadBeacon from Radius Networks

Radius Networks provide a useful Beacon config application that you can download for free (once you register)

The application is available for Android, iOS and Mac.Radius Network Beacon Configuration

 

 

The default pin for editing the beacons is 0000.

Requirements for the Config App

For the software requirements visit the Beacon config application home page. In short, Bluetooth 4 is a minimum and Mac (10.9+) or recent iOS / Android releases.

Securing your Beacons….

Before you deploy your beacons, you may want to secure your beacon from tampering.

It is suggested by Radius networks that you lock your beacon before its put into a live environment. Locking a beacon prevents any further editing over bluetooth, so you need to be sure of your config before you do this.

A little less radical is updating the pin code for editing the beacon, however this is easily cracked so really only ideal for short term setup.

More about what the different options on the config application do are available here: http://www.radiusnetworks.com/ibeacon/radbeacon/mac/2-0-0/help.html

The post What to do with Beacons before you code? appeared first on Stephen Ball's Technical Blog.


posted @ Sat, 11 Apr 2015 10:40:01 +0000 by Stephen Ball


Download Links for Delphi XE8, RAD Studio XE8 and C++Builder XE8

Here are the download links for free trial and registered user downloads of RAD Studio XE8Delphi XE8, and C++Builder XE8.

XE8 Trials

Free 30-day fully functional trials of the Architect edition.
Install from the Web for XE8 registered users 

If you need to re-download the installer after your initial installation.
RAD Studio XE8 ISOs for registered users 

If you want to create a full install backup DVD after installing and registering.
RAD Studio XE8 ISOs for first time installs 

If you can't install using the web installer due to firewall issues and need to create a DVD for your initial install.

Note that there are no official torrent or other downloads for RAD Studio XE8, Delphi XE8 or C++Builder XE8. Be sure to download them from the official source.

posted @ Sat, 11 Apr 2015 07:30:00 +0000 by Tim Del Chiaro


New VCL Styles in RAD Studio XE8

Delphi, C++Builder and RAD Studio XE8 include some great new VCL Styles. UI theming is an easy way to quickly change the look of your existing applications. 

The following new styles are included in XE8:

  • Glow
  • TabletLight
  • Sky

You can easily apply a custom style to your existing VCL Windows applications via Project > Options > Application > Appearance. 

New premium VCL styles are also available for RAD Studio XE8 as part of the XE8 Bonus Pack. You can access the offer details here: http://www.embarcadero.com/radoffer 


posted @ Fri, 10 Apr 2015 18:04:20 +0000 by sarinadupont


Announcing RAD Studio XE8! - The Connected App Platform for Windows and Beyond

This is a copy of the RAD Studio, Delphi and C++Builder XE8 announcement email for North America.

If you buy or upgrade now, you can get all of this:
  • 10% introductory discount 
  • Bonus software with your purchase
  • XE3 and later registered users qualify for upgrade pricing
  • XE2 and earlier registered users qualify for upgrade pricing when purchasing with 1 year Update Subscription
The What's New in XE8 webinar has already happened but if you fill out the registration form for it, you will get a link to watch the replay video next week.

Announcing RAD Studio XE8! 
The Connected App Platform for Windows and Beyond
RAD Studio XE8

RAD Studio XE8 has arrived and there has never been a more complete developer solution for rapidly designing, coding, and extending "connected" apps across Windows, Mac, iOS, Android and the Internet of Things (IoT). There are now more vital developer and business features packed into this release than ever before.

Calling VCL Developers! 
Quickly extend your existing VCL based Windows apps to create connected app solutions for Windows, tablet, mobile, IoT gadgets and devices, cloud services and Enterprise database back-ends!
Take a look at these RAD Studio XE8 highlights...
NEW!More Developer Productivity than ever with over 20 new IDE features, including new code refactorings, code navigation, live syntax checking, metrics and more
NEW!iOS 64 bit Object Pascal and C++ compilers, toolchain and support for iOS Universal Apps
NEW!GetIt Package Manager for easy discovery, download and update of source code libraries from within the IDE
NEW!Create proximity aware apps with components support for Bluetooth LE “beacons”
NEW!Quickly add AppAnalytics to fully understand how end-users are using your apps
NEW!Box2D physics engine to add a real life feel to any kind of application
NEW!Support for native HTTP(S) client libraries on Windows, OS X, iOS and Android
NEW!Integrated unit testing with the DUnitX testing framework
...AND MUCH MORE!
Whether you are building new software, or updating existing applications, RAD Studio XE8 will take you to Windows and Beyond!

posted @ Fri, 10 Apr 2015 13:33:00 +0000 by Tim Del Chiaro


Database updates in RAD Studio XE8

Database updates in RAD Studio XE8

With RAD Studio XE8 there have been a number of database updates to expand connectivity, and improve and introduce functionality for us programmers.

FireDAC & IBX support for Change Views

FireDAC has introduced new support for Change Views – enabling rapid identification of what has changed on the server side data and updating of client side stored data. See this <2min video for how these work.

Source code for the example ships in the samples directory:

<Samples><language>Database\FireDAC\Samples\DBMS Specific\InterBase\ChangeView

IBX has also introduced new components to make it easier to work with change views and subscriptions.

 New Platform – Teradata

FireDAC now includes support for Teradata, using the driver name TData.

TeraData in FireDAC

 

An example of how to set the driver properties is shown on the docwiki help for connecting to Teradata with Delphi.

DriverID=TData
Server=192.168.43.140
Database=MyDatabase
User_Name=dbc
Password=dbc

TDataSet TField speed up.

Marco Cantu mentioned on the Launch webinar Q&A a customer was claiming seen a speed up of around 25% on a TClientDataSet application due to the refactoring at the base of how TField is used at the core layer. :-) This is really cool for both VCL and also FMX developers.

64bit support for iOS

With the new platform for iOS 64bit, the database layer is also seamlessly available, just recompile and run :-)

Other updates

There are updates for EMS including push notification. EMS is a great way to access central data from mobile devices. EMS now is updated to include InterBase XE7 for both the server and ToGo side, allowing you to use Change Views on both Server and Clients.

Where FireDAC uses SQLite, it has been updated to a newer driver.

For more of whats new in RAD Studio XE8, including EMS updates, please click here Whats new in Delphi XE8 and C++ Builder XE8

 

The post Database updates in RAD Studio XE8 appeared first on Stephen Ball's Technical Blog.


posted @ Fri, 10 Apr 2015 10:40:01 +0000 by Stephen Ball


New approach of development of FireMonkey control "Control — Model — Presentation". Part 2. TEdit with autocomplete

We will continue a subject of the review of new approach on division of a control into the model and presentation described here. And in this article we will consider practical uses of this approach on the example autocompletion of input in TEdit.

Full article is available here


posted @ Thu, 09 Apr 2015 14:28:32 +0000 by Yaroslav Brovin


Server Response from: BLOGS1