Archive for the ‘CodeRage’ Category

CodeRage Mobile June 18-19, 2013

Thursday, June 6th, 2013

Yes, you read that right! In 12 days! It’s gonna ROCK! :)

CodeRage Mobile June 18-19

Press Release




Ven a verme en Ciudad de México y Guadalajara

Wednesday, May 15th, 2013


Regístrate ya para RAD Studio XE4 en Ciudad de México (21 de Mayo) y/o
RAD Studio XE4 en Guadalajara (22 de Mayo) y ven a verme en persona.

¡Estoy impaciente por verlos!


Handling iOS application events

Wednesday, May 1st, 2013

One thing that I’ve wanted to try for quite a while is doing something when an app gets put in the background (user hits the home button for example). An example of this is a game that my kids play - when they leave the game, the character yells out something like "Don’t leave!", "Come back!", "Hope you enjoy your day without me!" and other random fun stuff.

Sometimes it also schedules a notification to fire at a later date. Let’s say the kids forget to play the game for a few days… All of a sudden out of nowhere the iPad will scream at you "Come back and play NOW! I’m bored!"

How is this done? Let’s not waste anymore time… Here is the complete form source code for the simplest case - scheduling a notification upon entering the background.

unit Unit1;


  System.SysUtils, System.Classes, FMX.Forms, FMX.Platform;


  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
    { Private declarations }
    { Public declarations }
    function AppEvent(AAppEvent: TApplicationEvent; AContext: TObject) : Boolean;

  Form1: TForm1;


{$R *.fmx}


procedure SendNotification;
  NotificationService: IFMXNotificationCenter;
  Notification: TNotification;
  if TPlatformServices.Current.SupportsPlatformService(IFMXNotificationCenter) then
    NotificationService := TPlatformServices.Current.GetPlatformService(IFMXNotificationCenter) as IFMXNotificationCenter;

  if Assigned(NotificationService) then begin
    Notification := TNotification.Create;
      Notification.Name := 'MyLocalNotification';
      Notification.AlertBody := 'Hello from the Delphi XE4 iOS app that you used 5 seconds ago!';
      Notification.FireDate := Now + EncodeTime(0,0,5,0);

function TForm1.AppEvent(AAppEvent: TApplicationEvent; AContext: TObject) : Boolean;
  if AAppEvent = TApplicationEvent.aeEnteredBackground then

procedure TForm1.FormCreate(Sender: TObject);
  AppEventSvc: IFMXApplicationEventService;
  if TPlatformServices.Current.SupportsPlatformService(IFMXApplicationEventService, IInterface(AppEventSvc)) then


The main things that we do in this code are:

1. Hook up the Application Event Handler on OnCreate of our form
2. Schedule a notication if the event received is aeEnteredBackground

The rest is handled by iOS for us.

Special thanks to Darren Kosinski who shared one of his test examples on how to handle iOS application events!

Anders’ Analog Clock app ported to Delphi for iOS

Friday, March 22nd, 2013

My FireMonkey Clock app has been ported using a beta version of Delphi for iOS.

Main tab

Above you can see a screen shot of the app as it starts up. By default it uses "normal drive" - the second hand moves once per second and the minute hand moves once per minute.

The app is a Universal app (supports iPhone and iPad). The main clock screen uses a TScaledLayout to ensure proper scaling down to the iPhone (the app was designed for the iPad).

If you hit the Info button it will take you to the setup tab, where you can select "Flame" (or FireMonkey second hand) as well as "Smooth drive" - the second and minute hands move smoothly.

Setup tab

The setup screen uses a combination of items that scale and items that don’t scale. For instance, the toolbar, the back button, and the listbox with its items are not supposed to scale, but still be aligned properly. The clock faces, however, do scale inside of a TScaledLayout.

FireMonkey second hand

Above you can see what the FireMonkey second hand looks like.

Below is a screen shot of my Structure Pane where you can see how I designed the app:

Structure View

I also wanted to mention performance. The previous version of the app was created in XE2 where I got about 2-3 frames per second in smooth mode - not very smooth. However, this version created with our upcoming product gets a blazing 60 frames per second on the iPad 3 using iOS 6.1.3 and almost the same fps rate on iPhone 4 (iOS 5.1) and iPad 2 (iOS 6.1) at about 55+ frames per second.


PS: The screen shots above are actually from the *next* update I will be pushing soon… The current one looks almost the same, except for a few changes in layout.

CodeRage 7 C++ Replays

Friday, December 21st, 2012

Almost all CodeRage 7 C++ replays are available on the CodeRage 7 C++ web site.

We’re working on the remaining ones. ;)


Submitting a C++Builder XE3 application to the Mac AppStore

Tuesday, December 11th, 2012

Yesterday, I filled a hole in the schedule with an impromptu session on visualization of mathematical functions. At the end I also showed how to submit the application to the Mac AppStore.

At the end I ran into an error saying "Invalid Binary" and I filled in the details for my contact information that it asked me for.

However, this didn’t solve the entire problem.

You also need to turn off Dynamic RTL and Run Time Packages. Unless you code sign them manually on the Mac side.

Finally, in order to bypass an issue with the Incremental Linker for Mac, you will need to turn off the Incremental Linker.

Doing these three things in addition gave me a successful submission to the AppStore.


C++Builder R&D sessions at CodeRage 7 tomorrow

Tuesday, December 11th, 2012

Don’t miss these R&D sessions tomorrow (Wednesday) at CodeRage 7:

9am PST - Migrating C++Builder Code to 64-bit

This session will cover differences between the Embacadero Win32 and Win64 C++ compilers, comparing keywords, macros, extensions and standards conformance of bcc32 and bcc64. The focus will be on strategies to port existing C++ Projects (ActiveX, WebBroker, SOAP, etc) and writing new code in a way that works for both Platforms.

Bruneau Babet - Embarcadero

12pm PST - C++Builder 64-bit Windows Compiler: Supporting the Delphi Extensions Including RTTI

The C++ language standard provides a naming convention to identify language extensions using the double underbar (__) in front of any extensions. This session will discuss the language and runtime extensions added to the new C++Builder 64-bit Windows compiler to support Delphi language, types, components and enhanced RTTI.

Eli Boling - Embarcadero

1pm PST - Using the C++ Standard and Boost Libraries in your 32-bit & 64-bit Applications
The C++ Standard library is a set of classes and functions that are part of the ISO standard for C++. The Boost C++ libraries include a collection of portable C++ source libraries created by Boost community members (, some of which are now included as part of the C++ Standard library. In this session you will learn how you can use the C++ Standard and Boost libraries in your C++ applications for Windows and Mac OS X.

Lee Cantey - Embarcadero


CodeRage 7 for C++ takes place December 10-12. Don’t miss it.

Friday, November 30th, 2012

CodeRage 7 for C++ takes place December 10-12. Don’t miss it. It will be 3 days totally dedicated to C++!

Don’t miss the special session with Bjarne Stroustrup. Much more details in David I’s blog post here.

Register for CodeRage 7 for C++ now.

David I posted a great blog post on Embarcadero’s continued commitment to C, C99 and C++ here.


CodeRage is next week! Register NOW!

Wednesday, October 31st, 2012

CodeRage is less than a week away. If you haven’t registered yet, why not just do it right now?

Register for CodeRage
Learn more about CodeRage

If you’re a software developer, this is your kind of conference.  It’s technical. It’s flexible. It’s free!
CodeRage serves up real-world technical sessions designed to provide you with information you can put to work immediately in your projects, in your environment.

CodeRage brings you top industry speakers and technologists presenting on a wide variety of topics, all geared toward maximizing your productivity. Session and presenter highlights include:

•    Delphi Product Address - John Thomas
•    What’s New in the Delphi Language - Bob Swart
•    IDE Productivity Tips & Techniques - Brian Long
•    New Features of FireMonkey FM2 - Darren Kosinski
•    Building Scalable, Multi-tier Systems with DataSnap XE3 - Paweł Głowacki
•    Discover LiveBindings Advanced Features - Jim Tierney

…and so much more!

Attend the live online sessions and interact with session leaders and your peers.  Can’t make a session? No problem, return at your convenience and watch a video replay on-demand.

See you there!

Lots of R&D blogs on RAD Studio XE3

Wednesday, October 3rd, 2012

Darren Kosinski has blogged about FireMonkey 2 Under The Hood Changes: Properties and FireMonkey 2 Under The Hood Changes: PlatformServices

Eugene Kryukov has blogged about Bitmap Styles in FireMonkey 2.0, DirectX 10 in FireMonkey 2.0 and Styles Performance in XE3

Jim Tierney has blogged about XE3 Visual LiveBindings: Link controls to component properties and XE3 Visual LiveBindings: Actions

José León has blogged about HTML5 Builder – Client Pages

Masahiro Arai has blogged about Are you ready for Windows 8? Here is Live Tiles for your Apps

Sergey Roschin has blogged about TAction in XE3 (Google Translate link)

Stephen Blas has blogged about RAD Studio XE3 and SQLite

Yaroslav Brovin has blogged about Scrolling images by hand, using FMX 2.0, Part 1 (Google Translate link)

All perfect homework fodder to chew on in preparation for CodeRage 7! :)

Bad Behavior has blocked 1077 access attempts in the last 7 days.