In a recent Google+ post Andrea Raimondi was mentioning the JVCL's JvValidators components and asked whether we use/know them or not. Daniela Osterhagen mentioned that she preferred the input validation from my dzlib which led to a short discussion about how I implemented it. I added input validation functionality to dzlib because I didn't like … Continue reading Input validation in dzLib
Category: Delphi
Experimental GExperts Version 1.37 2015-04-11 released
The latest version is the first version that supports Delphi XE8. There is nothing really new about the formatter code. But the new release can be installed even if you don't have the official GExperts installer (yet). This is an extract from the readme file: ** Installing without an official installer ** With two Delphi … Continue reading Experimental GExperts Version 1.37 2015-04-11 released
Andy’s Blog and Tools added to DelphiPipe
I had forgotten one important blog: Andy's Blog and Tools. No longer.
Delphi Pipe
Since Delphi Feeds doesn't list my blog any more and generally isn't very fast in responding to requests for adding or removing feeds, I have created my own aggregated feed: Delphi Pipe. It's done with Yahoo Pipes and currently contains the following feeds in no particular order (*1): [wp-rss-aggregator limit="100"] Many of these are also … Continue reading Delphi Pipe
When const doesn’t mean const
Consider this code: procedure SplitAt(const _Input: string; _Position: integer; out _Head, _Tail: string); begin _Head := Copy(_Input, 1, _Position-1); _Tail := Copy(_Input, _Position); end; It's meant to split a given string into two parts at the given position. Nothing fancy, really, isn't it? Now, consider this call to the procedure above: var s1: string; s2: … Continue reading When const doesn’t mean const
Accessing the clipboard in a Firemonkey application
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
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
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