Visit site Delphi Haven
September 2011
5
votes
Converting from a Cocoa string to a Delphi string
Delphi Haven
– Reading Malcolm Groves’ useful little post about retrieving special directories in OS X, I noticed he converted from Cocoa to Delphi strings by calling the former’s UTF8String function. Given Cocoa strings are already UTF-16 encoded just like Delphi strings,* this would cause a ...
4
votes
A few Mac tips
Delphi Haven
– At the risk of the blind leading the blind… An OS X GUI application is conventionally ‘bundled’ or put into a special directory structure whose root has an .app extension (see here and scroll down for Apple’s documentation on what the structure actually entails). In Finder ...
9
votes
We can expect ‘frequent and regular FireMonkey updates’
Delphi Haven
– … sayeth the new Delphi/RAD Studio project manager, echoing both a previous statement of his and similar words by Michael Swindell. Well, we’ll see about that, won’t we? From where I’m looking, FireMonkey is doing an excellent impression of being another Delphi for PHP. Maybe ...
5
votes
A console window that gets on with Unicode – fancy that
Delphi Haven
– Like quite possibly a good proportion of people syndicated on DelphiFeeds.com, I’ve recently acquired a Mac. Being cheap, it’s only a refurbished iMac, but it looks good (and was spotless when taken out of the box). In terms of first impressions, I’ve found OS X a bit ...
9
votes
Fixing the FMX menu loop bug on Windows
Delphi Haven
– I’ve discovered a very simple bug in the implementation of FMX menu loops on Windows. This bug leads to what is in effect an Application.ProcessMessages loop in VCL terms, causing a CPU spike for the duration an FMX menu is shown. To fix, copy both FMX.Platform.Win.pas and FMX.Defines.inc to ...
2
votes
Getting the XE2 setup file
Delphi Haven
– While I’m about it, here’s another small XE2 installation-related tip: I bought my copy from Digital River in their capacity as the official Embarcadero store, but then had problems dowloading the setup file from them. Going over to the Embarcadero site proper, I registered for the XE2 ...
2
votes
XE2 (or more exactly, MSBuild) vs. HP notebooks
Delphi Haven
– For all I know it may have been an issue with earlier versions, but I’ve just installed XE2 Pro on my HP notebook (it already had XE Starter and a few VS Expresses) and stumbled across a small issue. When attempting to compile, the following error message came up: [Error Error] Invalid ...
July 2011
1
vote
Generic linked lists redux
Delphi Haven
– Do generics and typed pointers mix? Certainly, so long as you use a nested type: type TOuterType<T> = class public type PInnerType = ^TInnerType; TInnerType = record Value: T; end; end; OK, so the New/Dispose bug still holds, but that’s only a minor irritant. ...
4
votes
Interesting…
Delphi Haven
– Most of it’s just a copy of the XE (or should I say XE1?) demo tree, but a couple are new: http://radstudiodemos.svn.sourceforge.net/viewvc/radstudiodemos/branches/RadStudio_XE2/Delphi/ No EXEs though! I’ll leave the Sovietology to a certain frothy blogger-cum-team of bloggers (if said ...
2
votes
Things that make you go ‘urgh’…
Delphi Haven
– What’s the flaw in this test code? program Project1; {$APPTYPE CONSOLE} var Arr1, Arr2: array of array of Integer; I, J: Integer; begin SetLength(Arr1, 5, 5); for I := 0 to 4 do for J := 0 to 4 do Arr1[I, J] := I * J; Arr2 := Copy(Arr1); for I := 0 to 4 do for J := ...
2
votes
Weird in more ways than one
Delphi Haven
– To illustrate an annoying limitation of Delphi generics regarding typed pointers, Lars Fosdal has recently posted some code that provides a half-working generic double linked list implementation (link). The fact it only half works is at least half the point (so to speak), but I’m not sure the ...
June 2011
3
votes
Object cloning using the high level RTTI
Delphi Haven
– Someone’s probably demoed this before, and quite possibly demoed it better too, but hey, here’s my idea of generic object cloning using the high level RTTI. To be honest, in practice, I’m not sure this sort of thing – i.e., a completely generalised approach – is a very ...
0
votes
Welcome to the neighbourhood
Delphi Haven
– One hour! Link here – who knows, maybe the questioner will have become worthy enough for his question to be reopened by the time you click on it.
May 2011
6
votes
The tyranny of simple tests
Delphi Haven
– Last TMonitor post I promise (well, if until the ‘hotfix’ for TMonitor.Wait gets forgotten about…): it seems TMonitor’s apparent slowness in uncontended scenarios as discussed in my previous post is less than it first appeared. In fact, by tweaking my original test, I can now ...
9
votes
TMonitor redux
Delphi Haven
– Rather embarassingly, it appears the wait/pulse functionality of TMonitor is hopelessly broken. That’ll teach me for trying to demo something new, eh? In my (partial) defence, I had found serious issues before, but came to believe they must have arisen from how I was originally trying to use ...




