Get deep insight into the Android Native Development Kit for building complex apps. Using this practical step-by-step tutorial, highlighted with comments and tricks, discover how to run C/C++ code embedded in a Java application or in a standalone application. You will create a real native application starting from project creation through to full implementation of native API and the porting of existing third-party libraries. Grab this eBook whilst it’s free today!
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).
AOP allows you to perform separate of concerns (SoC) in your application, especially in the area of cross-cutting concerns like for instance logging, authorization, monitoring, etc.
It took a while in Delphi to allow for AOP, but the TVirtualMethodInterceptor (that introduced in Delphi 2010) can be used to do AOP (only for Virtual Methods, which is still way better than having no AOP at all).
The code requires a lot of manual labor. so I was glad that DSharp (a great library by Stefan Glienke – one of the leading Spring4D contributors) contains a nice wrapper around TVirtualMethodInterceptor so you can use AOP in an attribute based fashion.
Nick Hodges recorded a good introductory video on AOP in Delphi with slides and demo code:
A while ago, I posted [WayBack] the below StackOverflow answer. Recently a friend asked me about command-line parsing in Delphi, so here is the re-run:
Delphi contains a really nice unit called CommandParser with a [WayBack] TCommandParser class that does commandline parsing for you. Since it has [WayBack] virtually no documentation, here are a few things to get started. It works even in Delphi 2007.
TComponent that contains the properties you want to expose as commandline parameters (that is THiddenExecuteSettings in the HiddenExecuteSettingsUnit
a commandline parser controller. In our case THiddenExecuteArguments in theTHiddenExecuteArgumentsUnit (in retrospect not such a good name) that contains an InitCommandLine method that sets up a TCommandParser instance passing it your TComponent
It then executes a couple of [WayBack] AddSwitch calls to setup the parameters with both abbreviated and full commandline switches (like h and help)
ProcessCommandLine method on the TCommandParser instance to process the commandline and fill the properties of your TComponent (in my example, this is done in the ProcessCommandLine method).
Now comes the fun:
TCommandParser has a HelpText method that fully automatically assembles a helptext based upon what you fed it with the AddSwitch methods.
TCommandParser also has a SaveOptions method that allows you to save the current settings of your TComponent into a settings file.
When you have a registered Delphi, you can Ctrl-Click browse both the units and symbols of RTL, VCL, etc. But Delphi will not recompile these units.
Some third party components you cannot Ctrl-Click browse the units or symbols, unless you put the source directory in the Delphi Library Path (which causes them to be compiled each and every time).
Especially when using Delphi 2007 on Windows x64 system (8.x, 7, Vista, 2012 Server, 2008 Server, …), the Delphi specific .Targets files used by msbuild are simply installed to the wrong location.