Archive for the ‘Delphi 2007’ Category
Posted by jpluimers on 2014/07/19
Though fully justified text is most often in print, and not much in user interfaces any more, this might come in useful one day (it is based on the GDI functions TextOut and SetTextJustification):
David Millington Posted: Have you ever wanted to draw fully justified text ie, text that adheres to both the left and right sides of the destination rectangle? It’s more complicated than it seems, and there’s definitely no inbuilt support in the VCL. But here’s how to do it, including an open-source unit you can drop into your applications and use.
Drawing fully justified text to a canvas | Parnassus – Delphi Consulting & Plugins.
–jeroen
via:
Posted in Delphi, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/07/16
I used to forget about the difference between Variant and OleVariant, and used them like this:
Use OleVariants for OLE, and Variants for non OLE.
There is no need to manually clear them.
Luckily I was right, as the differences are documented in the Delphi on-line help at OLE-compatible Variant type (the oldest I could find was the Delphi 2010 OleVariant documentation): Read the rest of this entry »
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/07/03
Joseph G. Mitzen posted a very interesting (and elaborate <g>) comment on a post from me in 2009: Delphi – for … in on enumerated data types « The Wiert Corner – irregular stream of stuff.
The crux of his post is about consistency of your tools. And clearly, the Delphi team has some work to do in that regard especially when compared to the Python world where consistency is key (and takes a lot of time to introduce new features as a side effect).
He refers to the ADUG post For-in Enumeration | Australian Delphi User Group Members by DaddyHPriest that lists a number of areas where Delphi does not have enumerator support for.
Which reminds me I promised to publish some more enumeration demos showing what kind of code could be eliminated if things became more consistent.
Hopefully this summer gives me a bit more time for that (:
–jeroen
via: Delphi – for … in on enumerated data types « The Wiert Corner – irregular stream of stuff.
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | 4 Comments »
Posted by jpluimers on 2014/06/11
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 »
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 »
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 »
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 »
Posted by jpluimers on 2014/05/02
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 »
Posted by jpluimers on 2014/04/22
Just found out that a new version of Raize Components 6 with Delphi XE6 support got released.
Raize Components 6 actually supports Delphi 2009 through XE6 (and C++ Builder and RAD Studio).
Older Delphi versions are also supported by older Raize Component versions, as Ray Konopka posted last year:
via Raize Software Support Forums • View topic – Installing multiple versions of the Raize Components.
(In the above quote, I included the links to the various trial versions).
There is also the famous Demo program download RCDemo.zip and nice videos:
via Raize Components Demo/Trial Edition.
For the dot version nitpickers, here are the current versions as of writing: Read the rest of this entry »
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | 3 Comments »
Posted by jpluimers on 2014/04/19
GExperts 1.37 (commit 875, but no tag yet) now supports Delphi XE6 and XE5, and ahost of older Delphi versions. Binary downloads are available at Download | GExperts
These were the release news items:
In addition to what is in those items, 1.37contain a substantial speed improvement and some other fixes from me (I hope this fix also will get in later) in the Grep Search.
It is likely that this will be the last GExperts that support Pre-Delphi-2007 versions (currently 2006, 2005, 8.02, 7.1 and 6.02).
It is not clear if there will be a GExperts for Appmethod, as Appmethod does not provide functioning command-line compilers like I already blogged about in Spring4D now has projects for Appmethod, but it cannot support Appmethod in the automated build engine.
You can get an Experimental GExperts version for Delphi XE6..6.02 (that includes a source formatter) from Experimental GExperts Version » twm’s blog.
From Thomas Mueller (the author of the experimental GExperts versions), there are also a few other interesting blog posts you probably will like:
–jeroen
via: Download | GExperts.
Posted in Appmethod, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | Tagged: GExperts | 6 Comments »
Posted by jpluimers on 2014/04/16
Once every while, one of your StackOverflow answers gets an edit suggestion that is really valuable.
This case it was Edwin Yip who suggested to emphasize the difference between TStringBuilder and TStringList (adding characters versus lines).
Too bad that freshly 10k user Makoto showed he hates bold emphasis, intentional property casing and post signatures by removing the added value (there is so much emphasis he could remove on other answers to warrant at least a day time job).
I know that not all emphasis is welcomed at StackOverflow, but in this case I think it added real value.
So I edited my own answer to add even more value: showing the idioms I use for building strings, and now it is time to quote it: 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 »