Tag Archives: Delphi

Switches

During the last weeks it happened often that I had to write some command line apps. The reason for this is that more and more things are running automatically in tools like FinalBuilder (I will write an article about this … Continue reading

Posted in Tips and Tricks | Tagged | Comments Off on Switches

try…finally for multiple objects

Today I found another common mistake. Someone used more than one object and has to free them. var pObject1: TMyObject1; pObject2: TMyObject2; begin pObject1 := TMyObject1.Create; try pObject1.DoSomething; pObject2 := TMyObject2.Create; try pObject2.DoSomethingElse; finally pObject2.Free; end; finally pObject1.Free; end; end; … Continue reading

Posted in Tips and Tricks | Tagged | Comments Off on try…finally for multiple objects

ANSIToOEM

Today I found some old source code. Someone wanted to write a file in the old OEM codepage. Therefore he wrote a small function that encapsulates the Windows API CharToOem function. class function TStrUtil.ANSIToOEM(const ANSI: string): string; var sBuffer: AnsiString; … Continue reading

Posted in Tips and Tricks | Tagged | Comments Off on ANSIToOEM

PowerPDF

In this article I would like to give some details about PowerPDF. PowerPDF is a Delphi VCL component that allows to create pdf documents visually. PowerPDF has originally been created by Takeshi Kanno, a Japanese Delphi Developer. Since he stopped … Continue reading

Posted in Third Party Components | Tagged | Comments Off on PowerPDF