Microsoft released a Windows Update this week that caused quite a problem for Delphi developers still using Delphi 2006 to 2010. When starting a second instance of the IDE they now get the error Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr The update in question is a security update for all supported Windows versions and has the number … Continue reading Sabotaged by Windows Update
Category: Delphi
Enabling the Developer Tools in Delphi Chromium Embedded
Recently I had to debug some JavaScript code that did not work correctly, when loaded into a Chromium Embedded frame in one of my applications. There is built-in support for the Developer Tools in Chrome, which is also available in Chromium Embedded. After searching the web, I found that the DCEF3 sources already come with … Continue reading Enabling the Developer Tools in Delphi Chromium Embedded
Delphiversions.inc
In the olden days[tm] there was a project for maintaining a Delphiversions.inc file which created human readable conditional defines from the VERxx conditional defines of the Delphi compilers. Since it seems to have vanished from the face of the Internet[tm], I have just added a new page to the Delphi Wiki which you can just … Continue reading Delphiversions.inc
Displaying a multi line error message without wasting space
I have got a form that usually displays outputs from various sources, each of which has a frame for its own purpose. Now, if an error occurs with any of theses sources, I want to display that error message on the bottom of the form, just above the panel that contains the action buttons. It … Continue reading Displaying a multi line error message without wasting space
Adding fields to a TDataset in code
The Delphi IDE allows you to add fields to a TDataset (descendant e.g. TTable, TQuery, TAdoTable etc.) by right clicking on the component and selecting "Add Field" or "New Field". For a particular project I didn't want to do that because I kept changing the query for which I want to add the fields. But … Continue reading Adding fields to a TDataset in code
GORM experimental release
GORM is an editor for .po files (in case that link is dead, see the Internet Archive) that was originally written by Lars Dybdahl and to which I have been contributing quite a few features in recent years. Since Lars is too busy to do a release and currently even the original download doesn't seem … Continue reading GORM experimental release
Comparing Variants
I hate Variants, did I say that before? They just make everything more complex than necessary. Did you ever try to compare two variants? E.g. you have got one that contains an empty string ('') and another that contains a date. Now you want to know whether they are equal or not. Simple? v1 := … Continue reading Comparing Variants
Comparing INI files
INI files are a simple but powerful means of storing a program's configuration. They have existed since the 16 bit Windows times, where they were stored in the Windows directory, later on they were stored in the program's executable directory and nowadays they usually go somewhere into a user's home directory. Microsoft has tried to … Continue reading Comparing INI files
Setting the caret in a TMemo
Once in a while you want to set the caret position (aka cursor position) in a TMemo to a given line and character in that line. If you google for it you will find lots of hits that tell you to do the following: With Memo1 do SelStart := Perform(EM_LINEINDEX, Line, 0); or without the … Continue reading Setting the caret in a TMemo
Weak references – or why you should enable ReportMemoryLeaksOnShutdown
I was enhancing my dzMdbViewer tool with a view that shows the table structure rather than the data of the table, when I out of curiosity added ReportMemoryLeaksOnShutdown := True; to the source code. I found some memory leaks that were easy to fix (and which I would probably have fixed anyway later when reviewing … Continue reading Weak references – or why you should enable ReportMemoryLeaksOnShutdown