A bit more than a year ago, I wrote about Delphi: you should avoid the with statement as it makes your code less future proof. That caused some nice comments on the blog, and some more on LinkedIn where Paul Foster mentioned it in a thread ‘Jeroen Pluimers makes a case against “with” statements.‘ Both interesting reads, especially the reasons that people use or avoid with, or keep its use in balance. There is one set of comments I want to emphasize: refactoring multiple with statements into a one function and a call per former with. Read the rest of this entry »
Archive for the ‘Delphi’ Category
Delphi `with` post and discussion revisited (via: wiert.me and LinkedIn)
Posted by jpluimers on 2014/06/11
Posted in Borland Pascal, Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Pascal, Software Development, Turbo Pascal, With statement | 19 Comments »
Delphi multithreading and DLL exports: watch your exceptions (via: Stack Overflow)
Posted by jpluimers on 2014/06/03
Talking about Danny Thorpe: he also posted a nice hint on threading methods for ancient Delphi versions that equally applies to DLL exports in any Delphi version, even any programming environment.
Recently, I had to do some surgery in such a Pre-Delphi 6 application, and I was really happy to remember this answer: it instantly solved some process crashes, and the added logging allowed for investigating the actual cause.
Note that this tip isn’t just a good advice for old Delphi versions.
Even in younger Delphi versions, you have to watch methods that can be called from outside a regular Delphi context, for instance exported methods.
Heck, it applies to virtually any development environment: exceptions usually are very specific to that environment and should never cross a process boundary.
Summary
Take the approach below
- for Execute methods in your own thread classes in Delphi 5 or earlier
- for any method that can be called externally (like DLL exports) Read the rest of this entry »
Posted in Delphi, Delphi 1, Delphi 2, 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, Delphi XE4, Development, Software Development | Leave a Comment »
delphi – Is there a way to get a VCL Control’s name through the windows API? – Stack Overflow
Posted by jpluimers on 2014/05/29
Thanks Samaliani for posting a Delphi GetWinControlName function as answer to Is there a way to get a VCL Control’s name through the windows API?
The cool thing: it works across processes (as long as your own process has ReadProcessMemory rights).
It works from Delphi XE3 and up.
Be sure to also read the comments by Danny Thorpe on the automation framework in Delphi: that might also be a good place to get this information from.
–jeroen
via: delphi – Is there a way to get a VCL Control’s name through the windows API? – Stack Overflow.
Posted in Delphi, Delphi XE3, Delphi XE4, Development, Software Development | 3 Comments »
Recommended reads when dealing with Character Encodings in software
Posted by jpluimers on 2014/05/06
Apart from the mandatory Joel on Software article about Unicode and Character sets, these two articles are of great value too:
Fun to read from that blog is the Historical Technology section including this article:
–jeroen
PS: The mandatory one is The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) – Joel on Software.
Posted in .NET, Ansi, ASCII, CP437/OEM 437/PC-8, Delphi, Development, EBCDIC, Encoding, ISO-8859, ISO8859, Shift JIS, Software Development, Unicode, UTF-8, UTF8, Windows-1252 | Leave a Comment »
Delphi: Design-Time Component Name Limited to 63 characters (via: Vin Colgin – Google+)
Posted by jpluimers on 2014/05/05
I learned something new today (thanks Vin Colgin) the Delphi Design-Time Component Name is Limited to 63 characters.
Uwe Raabe found out that this an Object Inspector thing due to this constant in DesignIntf.pas:
const MaxIdentLength = 63;
It has been probably there since Delphi 1 and has been documented on-line since at least Delphi 2007.
I remember having had long (like 100+ character) identifiers in source code, but not in the Object Inspector.
Now I know you can’t (:
–jeroen
via: Vin Colgin – Google+ – Delphi: Design-Time Component Name Limited to 63 characters….
Posted in Delphi, Delphi 1, Delphi 2, 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, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | 4 Comments »
Interesting discussion about generic Dictionaries in Delphi (via: Steve Maughan – Google+ – TObjectDictionary Advice Needed)
Posted by jpluimers on 2014/05/05
There is an interesting G+ discussion thread about generic Dictionaries in Delphi.
It covers the stock TObjectDictionary in the Generic.Collections unit, Spring4D, performance characteristics like O(1), O(log n), etc, and implementation details like fill factors and hashing algorithms.
Worth reading at Steve Maughan – Google+ – TObjectDictionary Advice Needed I’ve been using Delphi for….
Since TObjectDictionary hasn’t changed much since the introduction of generics in Delphi, this discussion is valid for at least Delphi XE and up (and probably Delphi 2010 and 2009 as well).
I’m not sure about these last ones as like Andreas Hausladen, I’m cutting back on the Delphi versions I regularly use, which for now are mainly XE6, XE3, XE and 2007).
–jeroen
Posted in Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | Leave a Comment »
permissions – Delphi – setting Full Control on Registry Key – Stack Overflow
Posted by jpluimers on 2014/05/02
One of those StackOverflow gems: permissions – Delphi – setting Full Control on Registry Key – Stack Overflow.
–jeroen
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | 4 Comments »
Interesting thread on IP geolocation and providers (via: Dan Sohad – Google+)
Posted by jpluimers on 2014/05/02
IP geolocation is hard, and very dependent on where you are in the world. Providers giving different or confusing results are not exceptional.
See the struggle at Dan Sohad – Google+ – Hi! I working in a IP locate app. I’m using as “motors”: … where Dan Sohad tries a Delphi implementation.
–jeroen
Posted in Delphi, Development, Geolocation, Software Development | Leave a Comment »
Call for help: Spring4D and Delphi MultiCast events: working for Win32, Win64 and Mac OS X x64, but Android/iOS ARM help needed.
Posted by jpluimers on 2014/04/22
Years after Allen Bauer and a few others wrote about Delphi MultiCast events, the Spring4D framework now supports MultiCast events on 3 platforms:
- Win32
- Win64
- Mac OS x86
Depending on the platform, the minimum required Delphi version is this (the develop branch builds in Delphi XE6):
- Win32: Delphi 2010 and up.
- Win64: Delphi XE2 and up.
- MacOSX: Delphi XE2 and up.
There are plans for support on Mobile platforms, and Spring4D needs help with that:
- The Intel implementation is written in Assembly, and fast.
- The Arm compiler does not allow Assembly language for various reasons.
So there is a need for an ARM solution not based on assembly in the Delphi code, preferably as cross-platform as possible. Read the rest of this entry »
Posted in Delphi, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, QC, Software Development, Spring4D | 1 Comment »
More Raize Software updates for Delphi XE6: CodeSite Studio 5.1.5, Inspex 2.6.3, DropMaster 2.4.3.
Posted by jpluimers on 2014/04/22
After finding out that Raize Components 6 and Raize Components 5 updates for Delphi XE6 I checked Raize Software‘s latest news page and was glad to see that these also got updates:
- CodeSite Studio version 5.1.5.
- Inspex version 2.6.3.
- DropMaster version 2.4.3.
The only one not yet having XE6 support is this one:
–jeroen
Posted in Delphi, Delphi XE6, Development, Software Development | Leave a Comment »





