Archive for the ‘Delphi’ Category
Posted by jpluimers on 2018/07/03
–
It’s important to describe features right so everyone understands what you mean.
And note that you should end all your IFDEF with IFEND to stay compatible with the broadest set of Delphi versions possible.
–jeroen
Source: [WayBack] delphi – What is the use of NEXTGEN compiler conditional? – Stack Overflow
PS: Note the comment below by Remy Lebeau:
Note, in Delphi XE3 and later, you might also need to use {$LEGACYIFEND ON} (http://docwiki.embarcadero.com/RADStudio/en/Legacy_IFEND_(Delphi)) in order to use {$IFEND} correctly, particularly if you have nested {$IF} and {$IF(N)DEF} blocks in your code.
A quick search for “LEGACYIFEND” “Delphi” “XE3” revealed this directive was indeed introduced in Delphi XE3, but not documented until XE4:
Brian Long documents how to get around the limitation that Remy commented about:
{$ifdef CONDITIONALEXPRESSIONS}
{$if CompilerVersion >= 24.0}
{$LEGACYIFEND ON}
{$ifend}
{$endif}
It is in fact at the top of [WayBack] indy/IdCompilerDefines.inc at master · graemeg/indy · GitHub, which reminds me that there is now a git mirror of Indy at GitHub:
[WayBack] GitHub – graemeg/indy: Indy (Internet Direct) framework. This is an unofficial mirror repository which gets synced every 15 minutes. It contains the full history from the official Indy 10 SVN repository.
–jeroen
Posted in Delphi, Development, Software Development | 2 Comments »
Posted by jpluimers on 2018/06/29
Delphi formatter setting, so I can manually arrange uses lists:

–jeroen
Uwe Raabe commented on G+:
Also available in MMX Code Explorer in the settings dialog: Pascal -Sorting – Format unit uses clauses – “Each unit on a new line”.
If you prefer the standard setting and spare the other for special purpose, there is “Format Uses – Alternate” in the context menu. Perhaps give it a decent shortcut for quick access.
Bernd Ott in the same thread:
Important because scm. Less merge trouble. Only the last semicolon in last row is always stupid.
https://plus.google.com/+JeroenPluimers/posts/RfrCkDAd95G
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 4 Comments »
Posted by jpluimers on 2018/06/29
I forgot to schedule the post below. It is still relevant if you create a machine with lots of Delphi versions on it.
Read the rest of this entry »
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, Database Development, Delphi, Delphi 2007, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Firebird, InterBase, Power User, Software Development, Windows, Windows 8 | 2 Comments »
Posted by jpluimers on 2018/06/27
By default, Delphi always generates .res resource files when compiling a project.
There are two things you need to change to turn this off; the first is on by default, the second could be your own change:
- Remove the
{$R *.res} from your .dpr file and turn “Runtime Themes” to “None” from the default “Enable runtime themes” under “Target” settings “All configurations – 32-bit Windows platform” and “All configurations – 64-bit Windows platform”
- Disable “Include version information in project” under “Target” settings “All configurations – 32-bit Windows platform” and “All configurations – 64-bit Windows platform”

Read the rest of this entry »
Posted in Delphi, Development, Software Development | 1 Comment »
Posted by jpluimers on 2018/06/26
I totally missed that this was introduced in Delphi XE8: [Archive.is] Settings Migration Tool – RAD Studio.
It allows exporting/importing your Delphi settings and migrate them from older Delphi versions.
I need to try to find out which older Delphi versions it supports.
–jeroen
via: [WayBack] For once, I remembered …\Studio\19.0\bin\migrationtool.exe and imported all the IDE tweaks and color settings I had… – Lars Fosdal – Google+
Read the rest of this entry »
Posted in Delphi, Development, Software Development | 4 Comments »
Posted by jpluimers on 2018/06/21
Very often, I see people ask for how to embed multi-line strings in a Delphi source file.
The short answer is: you can’t.
The long answer is: you can’t and if you want you have to hack your way around.
The answer should be: just like any of these languages that do support multiline strings:
- Python
- JavasScript
- Ruby
- C#
Many languages support this through a feature called HEREDOC.
Now in Delphi and other languages like Java are building ugly workarounds like for instance this one: [WayBack] RAD Studio Tip: Using resource scripts to organize project dependencies. – Chapman World.
–jeroen
Posted in .NET, C#, Delphi, Development, JavaScript/ECMAScript, Python, Ruby, Scripting, Software Development | 17 Comments »
Posted by jpluimers on 2018/06/20
TestInsight is a great tool for automatically running your unit tests and seeing the results to make you more productive.
Two of the results treeview features you might not know make you even more productive:
- After selecting a node, pressing Ctrl-C will copy the content as text to the clipboard
- Double clicking will bring you to the unit test in your source code
You can get TestInsight at sglienke / TestInsight — Bitbucket
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 1 Comment »