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
Month: June 2014
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
Delphi7Help4BDS revisited
Today I updated the Delphi Help Expert (formerly called Delphi 7 Help for BDS) I wrote back then when Delphi 2005 came out and Borland managed to turn the online help into a mess (again). It now supports Delphi 2005 to XE6 and allows to reconfigure F1 + any of the modifier keys Shift, Ctrl, … Continue reading Delphi7Help4BDS revisited
Adding remote repositories to your mercurial.ini
Among a lot of other things you can add names for remote repositories to your mercurial.ini so you can access them without having to type that long path. This can be quite convenient e.g. [path] dzlib=ssh://twm@hg.code.sf.net/p/dzlib/hgdzmaincode allows me to clone a copy of my dzlib+tools main repository on sourceforge like this: hg clone dzlib dzlib+tools … Continue reading Adding remote repositories to your mercurial.ini
Avoiding long timeouts when connecting to Mercurial repositories on SourceForge
As described in a previous post I initially had some problems connecting to Mercurial repositories on SourceForge that went away without me changing anything. In that post I give the following entry for mercurial.ini: [ui] ssh="C:\Program Files (x86)\PuTTY\plink.exe" -ssh -agent -v -i "D:\path\to\my\private_key.ppk" While this works well, if Pageant is already running and has loaded … Continue reading Avoiding long timeouts when connecting to Mercurial repositories on SourceForge
AutoComplete for TEdits
I am sure you know about the useful controls TJvDirectoryEdit and TJvFilenameEdit from the JVCL. They come in handy whenever you need an edit field that should allow autocomplete for file or directory names. It always irked me that I had to include not only the JVCL but also the JCL in order to just … Continue reading AutoComplete for TEdits
TStringList.CaseSensitive
Did you know that TStringList has got a property called CaseSensitive? It's no surprise that it is used when comparing the strings while sorting. But did you know that it defaults to FALSE? WTF? (This is Delphi 2007.)
When TAB jumps to the next row
I just stumbled over an oddity in TJvDbGrid (which probably also applies to the standard Delphi TDbGrid): Including dgTab in the grid's Options resulted in TAB moving the cursor to the next row rather than to the next column as expected. It turns out, that this is due to the (protected) property TabStops which for … Continue reading When TAB jumps to the next row
Delphi IDE Explorer Expert for Delphi XEx
Based on a similar expert by David Hoyle for Delphi 3/4/5, which I found on Embarcadero CodeCentral, I have written the Delphi IDE Explorer Expert for Delphi XE .. XE6. It is a package based expert that installs into the Delphi IDE and displays its internal component structure. The original purpose was to find the … Continue reading Delphi IDE Explorer Expert for Delphi XEx