Posted by jpluimers on 2014/11/26
A long while ago, I posted a detailed answer on what functions the default comparers actually were calling to get a feel for if they would apply or not answering delphi – What does the default TArray.Sort comparator actually do and when would you use it? – Stack Overflow.
I needed that information recently because of some sorting issues I bumped into (sorting generic records), so finally a blog post.
First some links to documentation for even more background information:
There is the answer I gave: Read the rest of this entry »
Posted in Ansi, Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Encoding, Software Development, Unicode | Leave a Comment »
Posted by jpluimers on 2014/11/25
Using Delphi build-events (see my post Delphi prebuild/prelink/postbuild events), you can automate the process of signing your Delphi executables with a digital certificate.
Below the steps for signing Windows executables.
- You have your digital certificate in a PFX file.
(for testing you can use a self-signed certificate, for the real world you want a certificate leads to a CA).
- You have the Windows SDK installed that provides SignTool.
(in this case, I presume a Windows 7 or 8 x64 machine with the Windows Software Development Kit (SDK) for Windows 8 installed. If not, you have to change the path in the various statements, for instance when using the Windows SDK: Download the Windows SDK for Windows 7 and More | MSDN.)
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | 1 Comment »
Posted by jpluimers on 2014/11/20
Please someone add the Software on a String blog to DelphiFeeds (:
Great article on testing implementations of interfaces in a generic way. With examples in NUnit and DUnit.
How do I test an interface? Should I even do that? | Software on a String.
And then Stefan Glienke made a great comment at https://plus.google.com/u/0/+MarjanVenema/posts/Dgb8WADLwXZ making the DUnit implementation even easier:
But even if you go without that extra base class the cool thing is that you don’t need to restrict your classes to be a TInterfacedObject but specify the interface they need to implement (yay, compiletime type safety) and then you can get rid of the Supports call and directly assign the result of the ctor call to the sut variable.
Read the rest of this entry »
Posted in Delphi, Delphi 2007, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/11/20
Ever since the Delphi build engine got changed to MS Build in Delphi 2007, many people use Delphi build events. Their order is prebuild, prelink and postbuild (or maybe better spelled pre-build, pre-link and post-build).
Before Delphi 2007, you had to fiddler with project groups and dependencies to fake pre-build and post-build events. For an example see Pre and Post-Build Automation in Delphi.
One of the really good things about these events is that build events appear in the output tab of the messages window.
One of the really bad things is that there is hardly any documentation about the build events.
At least two important things are missing:
- How the lines of a build event are actually executed
- How parameter expansion works inside build events
Let’s explain these. Read the rest of this entry »
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, FastMM, Software Development | 4 Comments »
Posted by jpluimers on 2014/11/19
A while ago I bumped into a funny problem with Delphi XE.
I moved all the code from the .dpr in a Main unit (the IDE sometimes overwrites part of the DPR).
This normally isn’t a problem, until Delphi re-generates the .RES file. The reason is that this .RES file can contain a manifest which enables Windows theming.
If there is no reference of the
Application object in the .DPR, the IDE will remove the Theming manifest from the .RES file, so your application run unthemed.
Three solutions: Read the rest of this entry »
Posted in Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | 5 Comments »