A while ago, StackOverflow user Kobus Smit did some brilliant editorial work that – due to current state of StackOverflow – sort of fired backwards: his question got marked as duplicate before he could post his excellent answer. After that answer was posted, the oh-so pride SO-demi gods never took any energy to revisit to see which answers were best.
His simple question:
How can my Delphi app easily write to the Windows Event Log?What is the difference between TEventLogger and ReportEvent? How do I use the ReportEvent function?
Which somehow should be encompassed by this Delphi 5 question (apparently that 15+ year old Delphi version is still considered current by the SO demi-gods).
The answer summarises and extends existing answers spread out over StackOverflow and adds an EventLog git repository wrapping the ReportEventandRegisterEventSource (which somehow is always a pain: Delphi services for instance often forget that).
Lesson learned when doing editorial work:
prepare both the answer and question in markdown off-line
ensure you mention in the question that the answer is meant as collection of “best of” answers found elsewhere
post the question and answer in rapid succession
cross your fingers for the StackOverflow demi-gods being in a good mood
I’ve seen this question coming up a few times, and bumped into this at a client recently: the UAC dialog coming up when debugging a 32-bit executable.
This is caused (more details below) by Installer Detection Technology introduced in Windows Vista (with UAC) and tightened in more modern Windows versions.
The solution is to either:
not include Installer, Patch, Update, Upgrade, Setup, … in your EXE name
provide a correct manifest to your EXE (getting this right can be hard)
Since the table there is incomplete (even the Embarcadero documentation is wrong as some shortcuts can turn on and off a mode), here are the relevant shortcuts keys:
Ctrl + O + C
Turns on/offblockcolumn selection mode
Delphi 5 and up
Ctrl + O + K
Turns on/off block selection mode
Delphi 5 and up
Ctrl + O + L
Selects current line (and turns off block selection mode)
Delphi 5 and up
This is especially useful when the block selection is stuck (this happens every now and then: it’s a known bug).
Normal people would give Valentine presents today.
But 20 years ago, Borland thought it was a nice idea to release Delphi. Then a revolutionary new tool and lots of scepticism. Now – after 20 years – still going strong, despite all kinds of funny things that management at Borland, InPrise, etc did and the wild ride the market had.
Back then, the argument was that the designer needed to be restructured to do that. Now that it has – to accommodate FMX – and it is time, especially for the vast majority of Delphi users primarily using the designers to get work done.
So my wish, after 20+ years of Delphi use:
Please bring multi-level undo/redo functionality in the Delphi designer (form, datamodule, etc).