You are not logged in.
Pages: 1
Hi! Does D2007 is still supported?
This simple test on TDynArray works on XE7 but not on D2007.
When I remove the record property Valor, it works.
It looks like a bug with Integers (and Booleans).
TRec = packed record
Nome: string;
Valor: Integer;
end;
TRecs = array of TRec;
procedure Test;
var
t: TRecs;
d: TDynArray;
i: Integer;
begin
SetLength(t, 5);
d.Init(TypeInfo(TRecs), t);
for i := 0 to Length(t) - 1 do
begin
t[i].Nome := 'Nome' + IntToStr(i);
t[i].Valor := 1;
end;
ShowMessage(d.SaveToJSON);
end;
Here is the Access Violation message.
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 0047114F in module 'Project1.exe'. Read of address 00000001'.
---------------------------
Break Continue Help
---------------------------
Offline
Under Delphi 2007, the needed RTTI is missing.
Use RegisterCustomJSONSerializerFromText() as documented http://synopse.info/files/html/Synopse% … #TITLE_224
Offline
Pages: 1