TMS Passkit at German Code Rage 2017

This year I will hold a presentation at the German Code Rage 2017. You can join it on Thursday, 22th at 1 pm.

I will talk about the new TMS PassKit component. With TMS PassKit, wallet PassKit files can be generated for use with the iOS / iPhone wallet of all types. Wallet is an application on Apple iOS that manages tickets, vouchers, boarding passes, store cards or other virtual objects. It is a part of the Apple Pay system which supports payment by NFC or Apple Wallet.

TMS Software, established in 1995, is a software development company specialized in:

  • VCL, FMX, LCL, FNC, ASP.NET, .NET, IntraWeb component development
  • Windows, Web, Android, iOS, macOS, Linux, Node.js development projects
  • Training, consulting & custom project development

TMS software has a team of experienced developers with main office in Europe, Belgium as well as offices in Uruguay and Brazil.

Posted in C++-Builder, Delphi, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin, RAD Studio 10.2 Tokyo, RAD Studio XE8, Third Party Components, Uncategorized | Leave a comment

Converted dfm to Text Format

Today Stefan Glienke mentioned at Google+ that there are some libraries which still use the binary format for dfm files. This is an issue since it is nearly impossible to recognize the changes in your vcs.

I do remember old Delphi version which only supported the binary format. In the Delphi bin folder you can find the convert.exe tool that converts a dfm file to the text format and vice versa. You can simply drop a dfm file on it.

Stefan mentioned that one if the libs with binaries is Abbrevia so that I converted them to the text format.

Posted in C++-Builder, Delphi, RAD Studio 10.2 Tokyo, Third Party Components, Tips and Tricks, TurboPack, Uncategorized | Leave a comment

Free Capacities

Hi all,

I currently have free capacities. I’m looking for remote contract work. I’m a specialist in all Delphi versions, particularly components, SQL databases, ORM and multi-threading.


Thanks,

Roman

Posted in C++-Builder, Delphi, FireMonkey, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin, RAD Studio 10.2 Tokyo, RAD Studio XE5, RAD Studio XE6, RAD Studio XE7, RAD Studio XE8, Third Party Components, Tips and Tricks, Uncategorized | Leave a comment

Supports

This week I had to maintain some legacy code that uses many interfaces and supports in order to find out if a specific interface is supported:

One of the tasks I had to do is to replace the interfaces with pure Delphi objects. That’s why I wondered if there is a chance to write something similar for objects.

I played a bit and found the following:

Posted in Delphi, RAD Studio 10.2 Tokyo, Tips and Tricks, Uncategorized | 4 Comments

FreeAndNil

There are a lot of articles about the use and abuse of FreeAndNil but there is one point I really don’t like about FreeAndNil: It is not type-safe. Let’s have a look at the implementation:

The comment describes the issue: “Be careful to only pass TObjects to this routine.” That’s why I would implement it in a different way:

This code is type-safe and don’t use pointer arithmetic. Maybe I will ask Marco if there is a chance to add the generic FreeAndNil method directly to TObject.

Posted in Delphi, RAD Studio 10.2 Tokyo, Tips and Tricks, Uncategorized | 6 Comments

VirtualTreeView Version 6.6.0

I just updated the TurboPack version of the VirtualTreeView to the version 6.6.0 and asked Embarcadero to update GetIt.

Posted in Delphi, RAD Studio 10.2 Tokyo, SourceForge, Third Party Components, TurboPack, Uncategorized | Leave a comment

Nice Approach For Exception Safe Code

Maybe everyone knows the issue with code that is not exception safe. Let’s see an example:

The function MyFunction returns an instance of an object which is normally no problem. But MyFunction creates the instance and then runs further code. And in case of an exception no one “cares” about the instance and you will simply get a memory leak.

That’s why people normally avoid functions that return instances or write the code in an exception safe way:

At this point some purists would say that the Result should also be assigned to nil after it had been destroyed.

I don’t want to start a long discussion about FreeAndNil but what people, including myself, don’t like is to catch an exception in order to raise it again a moment later.

Instead the code could be written with a try-finally-block:

The tricks are:

  1. Free can be called if an instance is nil.
  2. Finally is always called.
  3. After assigning the Result no further code that could cause an exception is called.
Posted in Delphi, FireMonkey, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin, RAD Studio 10.2 Tokyo, RAD Studio XE5, RAD Studio XE6, RAD Studio XE7, RAD Studio XE8, Tips and Tricks | 7 Comments

PNG Components and Tokyo

This week I received an email from Uwe Raabe that he has updated his png components under bitbucket.

That’s why I just updated the TurboPack version under GitHub.

As I mentioned in a previous post the RAD Studio 10.2 Tokyo version of TurboPack of is now located at a different place.

I will also ask Marco to update GetIt.

Posted in C++-Builder, Delphi, RAD Studio 10.2 Tokyo, Third Party Components, TurboPack, TurboPower | 2 Comments

TFile.Size 2.0

Yesterday I got a suggestion for a better implementation for TFile.Size from Stefan Glienke. Many thanks for it, Stefan.

In order to make the code compatible to other functions in System.IOUtils, I modified it in the way that I’m raising an EInOutError if there is a problem.

I could compile the code for all platforms Win32, Win64, MacOS32, iOS32, iOS64, Android32 and Linux64.

Posted in C++-Builder, Delphi, RAD Studio 10.1 Berlin, RAD Studio 10.2 Tokyo, Uncategorized | Leave a comment

TFile.Size

I use very often the System.IOUtils units with the wonderful classes/records TPath, TDirectory and TFile. They are much more comfortable than the old functions from System.SysUtils like FindFirst etc..

But there is one method I’m really missing: It is the size of a file. For sure there are some workarounds but I think that this method belongs to TFile. That’s why I wrote a small helper class:

I will try to convince Marco or Jim to add this method to the next release. So stay tuned.

Posted in C++-Builder, Delphi, RAD Studio 10.2 Tokyo, Uncategorized | 6 Comments