Extended = Double in Lazarus Win64

Note to self: In Lazarus Win64 there is no floating point type Extended, it's mapped to Double. So, overloading something like: [delphi] function TryStr2Float(const _s: string; out _flt: Extended; _DecSeparator: Char = '.'): Boolean; overload; function TryStr2Float(const _s: string; out _flt: Double; _DecSeparator: Char = '.'): Boolean; overload; function TryStr2Float(const _s: string; out _flt: Single; … Continue reading Extended = Double in Lazarus Win64

Beware: IOTAComponent.GetPropValue needs 4 bytes for an enum

The ToolsAPI interface IOTAComponent declares two methods for getting property values: [delphi] IOTAComponent = interface(IUnknown) // [...] { Given the index or name, returns the property value. The untyped var must be large enough to hold the returned value. If the property is a descendant of TPersistent, the return value is a IOTAComponent. For properties … Continue reading Beware: IOTAComponent.GetPropValue needs 4 bytes for an enum

Getting a good night’s sleep is important

Today, I finally found the time to read up on some rather ancient e-mails. One was from Paolo in the dxgettext mailing list about a bug in gnugettext.pas: With SVN revision 75 and the following, AddDomainForResourceString() has no effect, additional translations are not used. Suggested patch: original code from SVN revision 79: [delphi] function TGnuGettextInstance.LoadResString( … Continue reading Getting a good night’s sleep is important