By default, if no translation for a language is available, dxgettext will not do any translation but use the strings as they are in the source code. Sometimes this is not desirable. e.g. Your customer does not understand the source language (e.g. your source language is not English but say German) You are using dxgettext … Continue reading Setting a default language with dxgettext
Month: November 2014
When CloseHandle does not close the handle
Today I spent several hours hunting down a problem with opening a COM port. Basically the program opens a COM port, writes some bytes to it, reads an answer and closes it again. This determines whether the expected device is connected to the COM port or not. If the answer is the expected one, so … Continue reading When CloseHandle does not close the handle
class as interface: Operator not applicable to this operand
Once in a while I run into this problem and every single time it takes me forever to remember the cause: Say, you have got an interface and a class implementing that interface: type IMyInterface = interface function asMyInterface: IMyInterface; end; type TMyClass = class(TInterfacedObject, IMyInterface) private function asMyInterface: IMyInterface; end; [...] function TMyClass.asMyInterface: IMyInterface; … Continue reading class as interface: Operator not applicable to this operand