Archive for the ‘Delphi’ Category
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 »
Posted by jpluimers on 2018/06/20
Reminder to self: if you want to stay compatible with old (Pre Delphi XE) source code, then do not use virtual methods in class helpers.
Technically you can, as class helpers can inherit from other class helpers, but this is only supported as of Delphi XE.
In lower versions you get these errors as apparently the Delphi compiler tags an IInterface to the class helper compiler result:
[Error] Project1.dpr(14): E2003 Undeclared identifier: 'QueryInterface'
[Error] Project1.dpr(14): E2003 Undeclared identifier: '_AddRef'
[Error] Project1.dpr(14): E2003 Undeclared identifier: '_Release'
Source: [WayBack] QualityCentral 9782
–jeroen
Posted in Delphi, Development, QC, Software Development | 2 Comments »