Archive for the ‘Delphi’ Category
Posted by jpluimers on 2014/03/13
Yet another example of somehow who got bitten hard by using the with statement (I decided to give with its own category on my blog).
This time it got shared by Paul Foster on G+ and comes down to this:
Even in unsuspiciously looking code, the wit statement can bite you, especially if you need to do refactoring and (because of that) introduce two names in the same scope.
Or in Paul‘s words:
Whilst upgrading the code to remove the Containers unit (its not supported on NextGen platforms, so I have to make things work with Generics.Collections instead, (bye bye D7 support for this code) and refactor a couple stupidities in my original design (they always creep in, don’t they) I ended up with two class members of the same name. The with block then looked OK but I was in fact not access the member I thought I was.
–jeroen
via: Paul Foster – Google+ – WITH IS EVIL! God damn it, I know it makes code easier to….
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 x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Pascal, Software Development, Turbo Pascal, With statement | 18 Comments »
Posted by jpluimers on 2014/03/12
For my own link archive: CodeRage 8 replays – Embarcadero Technologies – YouTube.
Lots of nice sessions, including these REST sessions:
About the REST support in Delphi: make sure you take a look at the REST Debugger application, as you get full source code for it and is an excellent starting point to see how the REST components work together (it is written using the FireMonkey UI framework so it runs on a Mac as well as on Windows).
David I explains more about the REST Debugger here: Sip from the Firehose : Using the REST Debugger will help you prototype your Delphi and C++ REST apps.
Jim McKeeth has a really nice video about it as well on XE5 REST Debugger Supercharged | The Podcast at Delphi.org which describes how to use Delphi the Delphi REST tools to use KimonoLabs to scrape data from web sites:
kimono : Turn websites into structured APIs from your browser in seconds.
–jeroen.
RestDemo folder with many examples that connect to many social things (Twitter, FaceBook, DropBox, etc).
Posted in Delphi, Delphi XE5, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/03/10
Every once in a while you have multiple threads or processes wanting to write a short message to the same log file. Append then will give you an I/O error 32 (ERROR_SHARING_VIOLATION), but the below small routine will sleep a bit while retrying a couple of times.
It uses these Delphi aspects around the $I or $IOCHECKS compiler directive:
- in $I+ mode, you get exceptions when certain “classic” Pascal style I/O operations fail.
- in $I- mode, you access the IOResult to obtain the results of those I/O operations
- IOResult gets the result of the last failed operation (if any) or zero if none failed
- IOResult clears the underlying storage to zero
- $IFOPT checks for a certain state of a compiler flag
- You can store the state of $OPT in a temporary conditional define
Note there are a few tables of codes you can get back through IOResult as basically you can get many GetLastError results in IOResult as well: 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, Delphi XE5, Development, Software Development | 2 Comments »
Posted by jpluimers on 2014/03/09
Ilya Grigorik – Google+ (from Google) shared a link to tldrlegal.com/: TLDRLegal – Software Licenses Explained in Plain English.
Very convenient to have all these licenses in one central places, bot for developers and consumers of software.
He also found why on certain devices (for instance Android Nexus 4) you get a security warning when viewing that site:
the www is missing from the certificate, so http://www.tldrlegal.com is not included in it: Qualys SSL Labs – Projects / SSL Server Test / tldrlegal.com.
For those devices apparently, https://tldrlegal.com redirects to https://www.tldrlegal.com giving the security warning.
On most desktop browsers, you see https://tldrlegal.com perfectly fine.
–jeroen
via:
(I tagged this post with .NET and Delphi because that’s what I used most for Software Development, of course it applies to any kind of software development).
Posted in .NET, Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/03/06

The @appmethod secret.
Wow. Out of the blue, I just read Embarcadero Launches AppMethod, A New Multi-Device Development Platform For Native Apps | TechCrunch. And I’m impressed.
In short:
At SXSW 2014 (which is running now, its agenda has a schedule from March 7th till March 16th), Embarcadero announces appmethod, to be released in beta on March 18th, 2014 for building native cross platform applications. Many have found out you can apply for the beta at www.appmethod.com.
More and more people are bumping into the appmethod link, for instance on FaceBook, on Google Plus, at Delphi Bistro and #Appmethod starting with the @appmethod secret by Joy Ruff.
Below are a few my observations from following all of the above links. Read them, especially the TechCrunch. I expect interesting posts from others to follow really soon now (:.
I’m only a few hours ahead of you readers, but I’m having a positive vibe just for these reasons: Read the rest of this entry »
Posted in Android, C++, Delphi, Delphi XE5, Development, iOS Development, JSON, Mobile Development, Object Pascal, OS X FMX, Pascal, SOAP/WebServices, Software Development | Tagged: embarcadero, Multi-Device, TechCrunch | 15 Comments »
Posted by jpluimers on 2014/03/06
Like When DelphiSpeedup cannot register itself in Delphi on Windows Vista/7/8, GExperts also had problems installing on Windows Vista and up when Delphi runs in a non-elevated account.
It said it installed fine, but it didn’t get included when Delphi was started. The reason was that it got installed in the wrong root key.
What happened is that GExperts installed itself into the HKLM root:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Borland\BDS\5.0\Experts]
GExperts=C:\Program Files (x86)\GExperts for Delphi 2007\GExpertsDelphi2007.dll
But it should have installed itself in the HKCU root: Read the rest of this entry »
Posted in Batch-Files, Delphi, Delphi 2007, Development, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2014/03/06
If you run FastMM4 in FullDebugMode, then here are two tips that new (and sometimes existing users) often overlook:
- If you set the
FullDebugMode directive in the IDE, build your project.
- Don’t forget to give your EXE access to FastMM_FullDebugMode.dll (x86), or FastMM_FullDebugMode64.dll (x64) which are stored in the FastMM4 download and in the precompiled directory of the source code.
Either put that DLL in your path, or copy it to your EXE directory.
- Make sure your EXE can write in the directory of the EXE.
The first makes sure all units are compiled with FullDebugMode (Delphi does not always do that automagically).
The second makes sure your EXE can access the DLL that writes out your *MemoryManager_EventLog.txt file containing memory leaks and other issues FastMM4 detected.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Event, FastMM, Software Development | 2 Comments »