Month: February 2009

Parameter checking

No Picture

One of the worst parts of Delphi’s RTL is the fact that parameters are not being checked for correctness in a function call. What this means is that the offending routine will not function as intended in certain…

Read More »

Generics + System.Move = Kaboom!

No Picture

It’s probably not a news anymore that the Move method (in System unit) should not be used to move chunks of memory that contain references to managed type (like String, Interface of dynamic arrays). By moving only the…

Read More »

How To: Creating a custom Variant type

No Picture

In this post I will detail on how to create a custom Variant for your data type. First of all, the help should be pretty useful in this case, but it if doesn’t help much, there is always…

Read More »

[Rant] Actions …

No Picture

Just a few words out of frustration: Do yourselves a favor and stay away from actions and ribbons in Delphi. At least for a while. If you really need fancy looking menus use JEDI. P.S. This would be…

Read More »

TDelegatedEqualityComparer

No Picture

In this post I will try to exemplify the use of TDelegatedEqualityComparer class which can be found in Generics.Defaults unit in Delphi 2009. TDelegatedEqualityComparer is a simple class that requires two user provided routines at creation time. These…

Read More »

Avoid using TDictionary

No Picture

There are serious flaws in TDictionary in Delphi 2009. Try to avoid using it until a fixed version comes out. You can find a list of them in QC, but just to name two: TDictionary.Clear() is flawed. If…

Read More »