Wednesday, September 26, 2012

The OTL Book has 100 readers!

image

Thanks to everybody who bought the book! Your contribution to the OmniThreadLibrary project is much appreciated!

And not forget the Russian book owners. There are only 17 of them at the moment but their contribution is appreciated nonetheless. (And, again, thanks to Alex Egorov who is translating the book into Russian.)

Tuesday, September 25, 2012

OmniThreadLibrary and XE3

Just a quick notice – SVN HEAD works fine with XE3. I’m cleaning up some old issues and will be releasing new version over the weekend (most probably).

Sunday, September 23, 2012

XE3: Internal Error G9413

Today I wanted to check whether the OmniThreadLibrary plays nice with XE3 (yes, I know, I’ve should have done this weeks ago, but there was simply not enough time) and I was completely surprised when OtlSync unit couldn’t be compiled due to an internal error G9413.

One hour later I have reduced the problem to a simple test case (below) and to a simple fix. So the OmniThreadLibrary will be supported in the XE3 (as we all hoped for).

For other poor souls that may have run into this problem, here’s a small test case and a workaround.

implementation

uses
RTTI;

type
TTest<T> = class
procedure Test;
end;

var
a: IInterface;

procedure TTest<T>.Test;
var
aMethCreate: TRttiMethod;
begin
if Length(aMethCreate.GetParameters) = 0 then
;

end;

initialization
a := nil; // F2084 Internal Error: G9413
end.

The problem here is that the G9413 internal error is not reported on the line which causes the problem. The real culprit here is the ‘if Length(aMethCreate.GetParameters)’ call in the ‘TTest<T>.Test’ method.

To fix the problem it is enough to introduce a temporary variable that stores the result of the GetParameters call.

unit Unit136;

interface

implementation

uses
RTTI;

type
TTest<T> = class
procedure Test;
end;

var
a: IInterface;

procedure TTest<T>.Test;
var
aMethCreate: TRttiMethod;
params : TArray<TRttiParameter>;
begin
params := aMethCreate.GetParameters;
if Length(params) = 0 then
;
end;

initialization
a := nil;
end.

The problem is reported as QC #108942.

Tuesday, September 18, 2012

XE3 World Tour in Ljubljana

P1100946

100+ people arrived. Presentation went through without big glitches and audience was very helpful when I managed to mess things up. Thanks, folks!

Friday, September 14, 2012

Don’t Miss XE3 Event in Ljubljana!

Only four days are left until the XE3 event in Ljubljana! I’ll be showing all that is new in RAD Studio XE3 including (but not limited to) FireMonkey2, Visual LiveBindings, Windows 8 development and HTML5 Builder.

Follow this link for registration and to see the detailed timetable.

A special notice for all friends – reserve some time for a beer or two after the presentation ;)

Wednesday, September 12, 2012

Parallel Programming with OTL [RU] Update

The always hard-working Alex has translated all the new material from the OTL book so now the Russian and English version are again in sync.

Thanks for all the work, Alex!