The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Delphi’ Category

Delphi: formatting uses lists to each unit is on a separate line

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 »

VM disk sizes

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 »

Delphi still doesn’t raise overflow exception on Int64 multiplication…

Posted by jpluimers on 2018/06/28

Thanks to Stefan Glienke for pointing me at the below patch for [WayBack] Why doesn’t raise overflow exception on multiplication example or how to detect in this case?{$RANGECHECKS ON} {$OVERFLOWCHECKS ON}varvalue: Int64;… – Rafael Dipold – Google+.

It’s basically an issue in __llmulo that has been documented but not solved since “forever”:

some people “some while ago” reported this and even posted a solution: [WayBackhttp://qc.embarcadero.com/wc/qcmain.aspx?d=34049

And there it is again: [WayBackhttp://qc.embarcadero.com/wc/qcmain.aspx?d=119146

And most recently: https://quality.embarcadero.com/browse/RSP-16617

FWIW here is a runtime patch that corrects this (using the version posted in QC#119146): https://pastebin.com/jzLgYeqm

The bug tracking of the Delphi team is so bad, that some of the reports actually mark this issue “As Designed” like in [WayBackhttp://qc.embarcadero.com/wc/qcmain.aspx?d=118287

The below patch requires rights to call [WayBackWriteProcessMemory as documented in [WayBackHow to Read and Write Other Process Memory.

–jeroen

Patch at [WayBack] https://pastebin.com/jzLgYeqm

Read the rest of this entry »

Posted in Delphi, Development, QC, Software Development | 3 Comments »

Stop Delphi generating .res files for unit test applications

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:

  1. 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”
  2. 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 »

Settings Migration Tool – RAD Studio

Posted by jpluimers on 2018/06/26

I totally missed that this was introduced in Delphi XE8: [Archive.isSettings 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 »

The Mysterious Case Of The Lost Inherited Call | The Art of Delphi Programming

Posted by jpluimers on 2018/06/25

A history lesson: not all minitor Delphi updates are binary compatible.[WayBack] The Mysterious Case Of The Lost Inherited Call | The Art of Delphi Programming.

I am looking forward to the solution that Uwe comes up with.

–jeroen

via [WayBack] Binary compatibility can be hard to achieve. The Mysterious Case Of The Lost Inherited Call https://www.uweraabe.de/Blog/2018/05/28/the-mysterious-cas… – Uwe Raabe – Google+

Posted in Delphi, Development, Software Development | Leave a Comment »

Dennis1000/mos6502-delphi: A MOS 6502 CPU emulator written in Delphi (a very basic C64 + VIC20 emulator included)

Posted by jpluimers on 2018/06/25

Really cool history: [Archive.isDennis1000/mos6502-delphi: A MOS 6502 CPU emulator written in Delphi (a very basic C64 + VIC20 emulator included)

It should run on most 32-bit Delphi versions.

via:

–jeroen

Posted in 6502, C64, Commodore, Delphi, Development, History, Software Development, VIC-20 | 2 Comments »

I wish the Delphi language supported multi-line strings

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:

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: [WayBackRAD 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 »

Two cool features of the TestInsight treeview – navigate and copy

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 »

Class helpers and virtual methods – E2003 Undeclared identifier: ‘QueryInterface’/ ‘_AddRef’/’_Release’

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: [WayBackQualityCentral 9782

–jeroen

Posted in Delphi, Development, QC, Software Development | 2 Comments »