Tuesday, May 31, 2005

Delphi for .NET CF Preview sighting 

David Intersimone, from Borland Developer Relations has blogged about the Delphi for .NET Compact Framework compiler preview which he is showing, among other things, during his current World tour.

I get to do a bit of CF development at work, but all this is done using C# and Visual Studio.NET. While it has been possible to use Delphi 2005 for CF development, this is currently only achievable by using the C# personality. It's good to see that we'll soon be able to do the same using the Delphi language.

(23) comments

Wednesday, May 18, 2005

Another example why I love the JCL 

I've been using both the JCL and JVCL from the wonderful folks at JEDI for a few years now, and was recently reminded why.

I had an unreproducible bug which I had to track down with some debug logging. While there were only one or two points in the code which could cause this particular bug, there were literally hundreds of places in the code which called these routines. With a bit of help from the stack tracing routines in the JCL, I was able to quickly pin down exactly where the problem was originiating. Below is all it took to get the stack trace I required to pinpoint the culprit:

function BuildStackTrace(const ALevel: Integer = 0): string;
sl: TStringList;
locInfo: TJclLocationInfo;
procAddr: Pointer;
i: Integer;
sl := TStringList.Create;
i := ALevel;
procAddr := Caller(i);
while procAddr <> nil do
if GetLocationInfo(procAddr, locInfo) then
'[$%s] %s.%s Line %d',
[IntToHex(Integer(locInfo.Address), 8), locInfo.UnitName, locInfo.ProcedureName, locInfo.LineNumber]));
procAddr := Caller(i);
Result := sl.Text;

For any Delphi developers who haven't checked out what the JEDI projects have to offer, I strongly recommend you check them out now. And to any JEDI contributors who may be reading this, thanks a bunch and if you're ever in Auckland, look me up and I'll shout you a drink of your favourite poison (with full source code, of course).

(3) comments

This page is powered by Blogger. Isn't yours?