Delphi

How to convert an object to JSON and back with a single line of code

Ever wanted to take an Object into a format that is easily persisted and back? Well now you can. New in XE6 is the REST.JSON unit. This allows you access to TJSON a class with some very helpful class methods. Using TJSON you can convert an object to a JSON string and back with a little help from generics along the way. The following code uses a class called TFoo that has a Foo and a Fee property…
Read more
Delphi

Creating an InterBase database on the fly with FireDAC

Recently I have been creating a number of applications using InterBase on iOS and Android using FireDAC components to talk to the database. One route to achieving this is by create the database file and table structure either via iSQL or using IBConsole GUI first before…
Delphi

Opening a file with the default program on Windows and Mac

I’ve been using the windows API call ShellExec for years to pass in the file name of a file I want to launch programatically with the default application on Windows; but I am now creating an application for use on Windows and Mac with FireMonkey for the upcoming season of Developer Direct LIVE Mobile Summer School (starting Tuesday 16th July) and I need to implement the same functionality on…
Read more
Delphi

Getting to grips with using FireMonkey Grids

Although there is a huge amount that is the same for Delphi and C++ Builder developers between VCL and FireMonkey, one thing that has changed is the FireMonkey grids. FireMonkey Grid Example After a recent question at an event, I thought I would put a little demo together to…
Delphi

Writing a FireMonkey DLL for use with a VCL application.

VCL App calling a FireMonkey DLL We have had a lot of questions on the road show tour about how to mix Fire Monkey and VCL. Although this is not officially supported, a number of blogs have started to appear with ways to do this. One way that is appropriate to add additional…