Archive for the ‘Delphi XE2’ Category
Posted by jpluimers on 2013/03/07
A while ago I was involved in a C header file translation for the header files of the IBM WebSphere MQ family of products, and the table helped a lot for the base types:
Delphi to C++ types mapping – RAD Studio.
A few C things missing there:
These articles helped resolving the missing bits:
Now we can do SOA between System i (a.k.a. iSeries, aka AS/400) from Windows 7.
–jeroen
PS: Later I found someone else also did a lot of work on this and published http://www.milosev.com/Download/WebSphere/WebSphereD2009.rar [WayBack] (thanks Murat Mutlu for pointing me at that) with a very thin note at http://www.milosev.com/32-mq/mq/171-delphi-2009.html [WayBack]
Posted in C++, C++ Builder, Delphi, Delphi 2006, Delphi XE2, Development, MQ Message Queueing/Queuing, Software Development, WebSphere MQ | Leave a Comment »
Posted by jpluimers on 2013/02/28

ISO 8601 was published on 06 05 88 and most recently amended on 12 01 04
Boy, am I glad with the xkcd: ISO 8601 post and image on the right.
One reason:
Please write dates and times so that everyone understands them, not just you.
The alt-text of the comic is hilarious (ISO 8601 was published on 06 05 88 and most recently amended on 12 01 04) showing the confusion of using 2 digit years not knowing which field means which (I thin XKCD author Randall Munroe and Mathematics of the ISO calendar got some of the dates, see PDF search dates below).
I found out in the mid 1980s that people I was communicating with internationally (back then the internet was forming and you already had BITNET Relay chat and email) were using different date formats than I did.
Ever since that, I’ve used the YYYY-MM-DD format of writing dates, encouraging others to use as well and as soon as I found out that was a standard, started to evangelize ISO 8601 (there is an ISO 8601 category on my blog), which – at the time of writing this – had had revisions in 1998 (on 1998-06-15), 2000 (on 2000-12-15) and 2004 (on 2004-12-01).
A lot later I found out that back in 1971, this date format was a recommendation, and in 1976 already a standard. Not nearly as old as Esperanto though (:
Speaking about languages:
At the end of last century, after Delphi 5 added year 2000 support (which made the 16-bit Delphi 1 disappear from the box as the effort to prove the product including all libraries was year 2000 proof), Delphi went cross platform.
The Delphi team working on both Kylix 1 and Delphi 6, the also added a DateUtils unit which provides a lot of cuntionality, including support for weak numbers. The first test version always assumed week 1 was the one with januari first in it. As ISO 8601 also indicates how the first week of a year should be determined, a couple of people (Jeroen W. Pluimers, Glenn Crouch, Rune Moberg and Ray Lischner) provided code that fixed this and a few other things in the unit. We even got mentioned by Cary Jensen!
That code is now also part of the RemObjects ShineOn library. That DateUtils unit is now on GitHub.
A Delphi XE version of the code (and a Delphi 2007 one) are now at NickDemoCode (Thanks Nick Hodges!).
Delphi is not the only environment having ISO 8601 support. XML has, .NET has, etc: it is now wide spread.
So follow your tools, and start using it yourself as well (:
Too bad the ISO 8601 standard text is not available publicly:
I remember the Y2K preparation era where the ISO-8601 standard was freely available at http://www.iso.ch/markete/8601.pdf, soon after the Year 2000, the PDF got locked behind a payment engine.
ISO suffers from heavy link rot too, for instance the ISO 3166 country codes used to be at http://www.iso.org/iso/prods-services/iso3166ma, but are now at http://www.iso.org/iso/home/standards/country_codes.htm. What about HTTP 303 or 302 redirect here guys?
Luckily people keep cached copies:
- “ISO 8601” “First edition” “1988-06-15” filetype:pdf
- “ISO 8601” “Second edition” “2000-12-15” filetype:pdf
- “ISO 8601” “Third edition” “2004-12-01” filetype:pdf
–jeroen
via: xkcd: ISO 8601.
Posted in .NET, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, ISO 8601, Power User, Prism, Software Development | Tagged: date formats, delphi 1, delphi 5, delphi 6, delphi team, glenn crouch, internet, iso 8601, iso calendar, mid 1980s, ray lischner, software, technology, xkcd | 10 Comments »
Posted by jpluimers on 2013/02/20
Right now, documentation on Delphi Conditional Defines is on pages like Conditional compilation (Delphi) – RAD Studio XE2, but it is limited as it is for one specific version of Delphi only.
However, over the course of Delphi versions, compiler platforms and bitness, and not forget Free Pascal and Turbo Pascal/Borland Pascal, the matrix has become huge.
There is no complete documentation on that in one place. Right now include files like Defines.inc, the DSPack.inc, the JCL include directory the JVCL common include directory and the Jedi.inc documentation contain the collective knowledge about this.
Someone should condense that in a table and – more important – keep it up to date.
At least now there is a post collecting some of the links that contain the knowledge (:
Found one that contains these columns
- Product & Version
- VERxxx defines
- __BORLANDC__ value
- RTLVersion
- CompilerVersion
- Package Version
via Compiler/RTL version overview « Muetze1 wich is now available on the wayback machine: http://web.archive.org/web/20131229055045/http://www.muetze1.de/?page_id=547
–jeroen
Posted in Borland Pascal, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, FreePascal, History, Pascal, Software Development, Turbo Pascal | 14 Comments »
Posted by jpluimers on 2013/02/15
I mailed the DelphiFeeds people to add the MonkeyStyler Blog by Mike Sutton.
It is a nice Delphi related blog focussing on FireMonkey stuff.
–jeroen
Posted in Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, FireMonkey, OS X FMX, Software Development | 4 Comments »
Posted by jpluimers on 2013/02/06
One of the really nice contributions on StackOverflow by Allen Bauer is almost 3 years ago.
It is about these three Delphi VCL methods introduced by TWinControl to make control development easier:
The really cool thing is that this API has been stable since 1995, and still allows you to subclass windows controls or create your own controls in a very simple way.
Note that Allen does not cover DestroyWnd or DestroyWindowHandle, but those are just counterparts of CreateWnd and CreateWindowHandle.
In normal Delphi application code, you have less Destroy overrides than Create overrides, and the same holds for control development.
–jeroen
via: delphi – What’s the difference between CreateWnd and CreateWindowHandle? – Stack Overflow.
Posted in Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Software Development | 2 Comments »
Posted by jpluimers on 2013/01/30
Just in case you wonder about Property using Generics in Delphi, they are not possible.
Thanks David for mentioning it, Hallvard for mentioning it even earlier and Rudy for confirming it.
These are supported with Generics in Delphi:
All of the supported aspects are linked to articles from excellent authors. There is far more on the internet about Delphi and Generics, but those are a good start.
Thanks Malcolm, Phil, Barry, Hallvard, Jolyon and many others for posting all those articles!
Note that this is not possible in C# either, Julian Bucknall organized a chat and explains why, but there is a workaround which I might try to port to Delphi in the future.
–jeroen
via: Property using Generics in Delphi – Stack Overflow.
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 3 Comments »
Posted by jpluimers on 2013/01/29
If Gloegg@Bonn has posted a few nice Delphi entries over the last couple of years, so he should be added to DelphiFeeds.
His last one was a very funny post on the Delphi implementation of Sleep sort.
It uses Generics, so you need at least Delphi 2009 or better.
–jeroen
via:
Posted in Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 4 Comments »
Posted by jpluimers on 2013/01/08
When developing in multiple languages, it sometimes is funny to see how they differ in compiler oddities.
Below are a few on const examples.
Basically, in C# you cannot go from a char const to a string const, and chars are a special kind of int.
In Delphi you cannot go from a string to a char. Read the rest of this entry »
Posted in .NET, ASCII, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Development, Encoding, Software Development, Unicode | Leave a Comment »
Posted by jpluimers on 2012/09/27
Cool: learned something new here:
About the path names of files being in the .dproj as well as in the .dpr:
@Jeroen – Looks like msbuild might need those entries, otherwise they’re possibly redundant, AFAICT… In any case, there is not much editing involved, just delete ‘dccreference’ entries and then a ‘save all’ in the IDE regenerates them. – Sertac Akyuz
–jeroen
via: refactoring – How to reorganize the folder structure of my units in Delphi? – Stack Overflow.
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Tagged: computer, Delphi, folder structure, ide, path names, stack overflow, technology | 14 Comments »