Delphi 2009 – CompilerVersion

[Estimated Reading Time: < 1 minute] Just a short post this one. Somebody else may already have mentioned this, but I only just figured it out for myself – the CompilerVersion for the Delphi 2009 compiler is not what you might expect (and is not what the documentation says it is!). Both CompilerVersion and RTLVersion have the value 20 in Delphi 2009. In Delphi 2007 these were 18.5 and 18.0 respectively.  Confusingly the documentation is correct for RTLVersion but incorrectly gives 18.0 as the value for CompilerVersion. Is anyone else wondering what happened to 19? Did Delphi 2008 happen after all and I just missed it?

Delphi 2009 – A Heads-Up for Low-Level Coders

[Estimated Reading Time: 8 minutes] Prompted by a conversation with some colleagues where-in we collectively speculated about the implementation details of a generic class and what impact – if any – this might have on performance vs a “traditional” polymorphic equivalent, I threw together a quick performance test case in my Smoketest framework, and as a result discovered a couple of significant changes in Delphi 2009 that created some unexpected problems.

Patching A Class VMT

[Estimated Reading Time: 6 minutes] Caution: The contents of this post may cause dizziness or nausea.  Take only as prescribed and if symptoms persist seek professional advice. Recently I found myself needing to do something I had never done before – create an instance of an arbitrary class derived from some base class and destroy it, and do so without invoking any constructor or destructor code that the derived class(es) may have introduced. This is the difficult bit. Impossible?  Don’t be silly, this is Delphi we’re talking about….

Another Week, (Yet) Another Poll

[Estimated Reading Time: < 1 minute] Last weeks poll was interesting – I was surprised to see such a high proportion of those polled indicating that they don’t do unit testing – slightly more than 50% in fact.  It wasn’t a huge sample size, but even so it surprised me. So that got me thinking about the use to which visitors to my blog are actually putting Delphi – unit testing isn’t relevant to everyone of course – and so I thought it might be useful to ask that question this week. This is another multi-response poll.  You may choose all the answers that apply to you.

Making A Splash

[Estimated Reading Time: 5 minutes] OK, so who hasn’t done this a million times – adding a splash screen to a Delphi application.  I’ve seen any number of “easy” ways to do this but during a session at Tech Ed ’08 this week I saw the latest in splash screen technology from Microsoft:  A SplashScreen API and build action supported by WPF 3.5 and VS 2008. I immediately thought of my Application psuedo-class and object in Deltics.Forms.

This Week’s Poll, Delphi at Tech Ed and 2009 Ship Date

[Estimated Reading Time: < 1 minute] Since I’m preparing a series of posts about (and eventual publication of) Smoketest, my own testing framework, I thought I’d test the water with this weeks poll and see what – if anything – people are already using as far as unit testing goes. Also I thought I’d briefly mention that I am at Microsoft Tech Ed ’08 (NZ) this week, and it was good to see that the NZ CodeGear reseller, Developer’s Inc were handling a steady stream of traffic at their stand where Delphi 2009 was on display (in the form of data sheets :)). I asked when Delphi 2009 was expected to ship and was told that it had been released to manufacturing and was on target to start shipping on 20th September – I forgot to ask whether that was an NZ date or worldwide. Not quite from the horses mouth, but pretty darn close. 🙂

Class Helpers – Ruling from the Appellate Court

[Estimated Reading Time: 4 minutes] My previous post on class helpers provoked a passionate response from some quarters who believed that they could be used “safely”.  More worrying was an apparent belief that their use was actually endorsed by CodeGear – tacitly or otherwise.  A rather odd view given the advice from CodeGear themselves is to not use them. No-one actually described a safe usage scenario though and those scenarios that were described all contained immediately apparent flaws of their own.  However, I have realised that there is, if not a safe way then at least a responsible one, to create class helpers. Using them is still not entirely safe however.