Category Archives: Tips and Tricks

Tips and tricks how to avoid common mistakes or how to generally improve your code.

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: type IMyInterface = interface(IInterface) [‘{F500EEDD-032E-4D15-A8C0-EFF673C2AF01}’] procedure DoSomething; end; procedure MyProcedure(const AIntf: IInterface); implementation uses … Continue reading

Posted in Delphi, RAD Studio 10.2 Tokyo, Tips and Tricks, Uncategorized | Comments Off on Supports

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: { FreeAndNil frees the given … Continue reading

Posted in Delphi, RAD Studio 10.2 Tokyo, Tips and Tricks, Uncategorized | Comments Off on FreeAndNil

Nice Approach For Exception Safe Code

Maybe everyone knows the issue with code that is not exception safe. Let’s see an example: function MyFunction: TMyObject; begin Result := TMyObject,Create; Result.DoSomething; end; The function MyFunction returns an instance of an object which is normally no problem. But … Continue reading

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 | Comments Off on Nice Approach For Exception Safe Code

RAD Studio 10.2 Tokyo and TurboPack

Maybe most of you already heard that the next release of RAD Studio will be 10.2 Tokyo. Additionally to supporting Win32, Win64, MacOS, iOS and Android RAD Studio 10.2 Tokyo will support Linux64. As always  I updated the TurboPack libraries … Continue reading

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, SourceForge, Third Party Components, Tips and Tricks, TurboPack, TurboPower | Comments Off on RAD Studio 10.2 Tokyo and TurboPack

IMAPSize

From time to time I’m making backups from my IMAP account. Therefore I’m using a small tool called IMAPSize. IMAPSize is written in Delphi 5 and the code is hosted under sourceforge. Last week it has been impossible to connect … Continue reading

Posted in Delphi, RAD Studio 10.1 Berlin, SourceForge, Third Party Components, Tips and Tricks, TurboPack | Comments Off on IMAPSize

EncodeString

This week I had to migrate an application from Delphi XE3 to Delphi Berlin and this application uses a Base64 encoding. Normally Base64 encoding is not difficult stuff and Delphi XE3 simply offers the function EncodeString in the unit Soap.EncdDecd. … Continue reading

Posted in C++-Builder, Delphi, FireMonkey, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin, RAD Studio XE5, RAD Studio XE6, RAD Studio XE7, RAD Studio XE8, Tips and Tricks, Uncategorized | Comments Off on EncodeString

GitHub or Bitbucket

I’m currently hosting the TurboPack components under GitHub but which not surprisingly supports Git. But normally I’m working with HG because of the great TortoiseHG tool. With the the help of the HGGit extension I can use TortoiseHG with Git … Continue reading

Posted in C++-Builder, Delphi, FireMonkey, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin, RAD Studio XE5, RAD Studio XE6, RAD Studio XE7, RAD Studio XE8, SourceForge, Third Party Components, Tips and Tricks, TurboPack, TurboPower, Uncategorized | Comments Off on GitHub or Bitbucket

RAD Studio 10.1 Berlin and TurboPack

Maybe most of you already heard the latest news, today RAD Studio 10.1 Berlin shipped. With the release of the version of RAD Studio I updated the TurboPack libraries. You can download the TurboPack libraries manually from the TurboPack website … Continue reading

Posted in C++-Builder, Delphi, FireMonkey, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin, RAD Studio XE5, RAD Studio XE6, RAD Studio XE7, RAD Studio XE8, SourceForge, Third Party Components, Tips and Tricks, TurboPack, TurboPower, Uncategorized | Comments Off on RAD Studio 10.1 Berlin and TurboPack

RAD Studio 10 Seattle and TurboPack

Maybe most of you already heard the latest news, today RAD Studio 10 Seattle shipped. With the release of the version of RAD Studio I updated the TurboPack libraries. You can download the TurboPack libraries manually from the TurboPack website … Continue reading

Posted in C++-Builder, Delphi, FireMonkey, RAD Studio 10 Seattle, RAD Studio XE5, RAD Studio XE6, RAD Studio XE7, RAD Studio XE8, SourceForge, Third Party Components, Tips and Tricks, TurboPack, TurboPower, Uncategorized | Tagged | Comments Off on RAD Studio 10 Seattle and TurboPack

Components for XE8 and GetIt

From my last post many of you already know that I’m maintaining some components for RAD Studio, particularly Delphi but also for C++Builder. As I mentioned in that post Embarcadero sponsored me to this work and Embarcadero’s RAD Studio Product … Continue reading

Posted in C++-Builder, Delphi, FireMonkey, RAD Studio XE5, RAD Studio XE6, RAD Studio XE7, RAD Studio XE8, SourceForge, Third Party Components, Tips and Tricks, TurboPack, TurboPower, Uncategorized | Comments Off on Components for XE8 and GetIt