It just took me quite a while to find this information so I'll put it here for future reference. A Firemonkey application can not just access the clipboard, it needs to ask the platform whether it actually has one, then get the service interface and use that. uses Fmx.Platform; [...] function TryGetClipboardService(out _clp: IFMXClipboardService): boolean; … Continue reading Accessing the clipboard in a Firemonkey application
Author: dummzeuch
Updated dzEditorLineEndsFix
I have just updated dzEditorLineEndsFix to address a small problem: The tool can be too fast so the file is already gone when Delphi tries to access it. It now waits 200 ms after detecting the file creation before moving it. This should solve the issue. It's available for download from the dzEditorLineEndsFix page on … Continue reading Updated dzEditorLineEndsFix
On expiring Dirvish images
Dirvish is a backup solution for Linux (and probably other unixoid OSes). I use it to make a daily backup of one server to a different server located in a different building (it's not the only backup solution we use but the most convenient one because we can access these files easily). Once set up, … Continue reading On expiring Dirvish images
Showing all parameters passed to a batch file
Sometimes you just want to know how a program gets called by another program or by Windows. In that case this little batch file might come in handy: @echo off rem This batch file shows its full filename and its parameters echo cmd file: %~dpnx0 echo Parameters: for %%I IN (%*) DO ECHO %%I pause … Continue reading Showing all parameters passed to a batch file
Note to self: Do not use double quotes around field names
Note to self: If MS Access adds double quotes to field names in queries, do not use them! It won't complain about them (You'd wish it would), but it just won't work. So if you see something like: SELECT * FROM t_Mst_Tageserfassung WHERE ("TeMitarbeiter"=92) AND ("TeArbeitstag"=#12/24/2014#); Remove the quotes and it will start to work … Continue reading Note to self: Do not use double quotes around field names
Setting a default language with dxgettext
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
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
Avira Antivirus E-Mail “security”
The current Avira Antivirus has got a module it calls "Internet security" which in turn has an option for e-mail security. What it does is capturing all connections to POP3, IMAP and SMTP servers and scanning them for viruses. That sounds good until you find, that your e-mail client stopped working even though you haven't … Continue reading Avira Antivirus E-Mail “security”
Fighting Secure Boot
I have bought an Acer Extensa notebook after reading the under 300 Euros notebooks test in the latest c't magazine where it came up as the winner regarding battery life and the rest wasn't too bad either. I chose the 4 GB model so it won't thrash the hd all the time. The Extensa comes … Continue reading Fighting Secure Boot