09-24-2018, 08:29 AM
Hello,
I have an issue reading a property declared as array of strings.
My unit (generated by CrossTalk ClassGen) contains a property AllIDs: StringArray read AllIDsRead:
When this function is called, I get an exception from:
\CrossTalk\Source\Atozed.CrossTalk.Streams.pas
function TCTStreamReader.ReadObject(aClass: TClass = nil): TObject;
-> raise ECTException.Create('Unknown type found during unboxing.');
because xType = dtObjectList {205}
I also have a function returning an StringArray (not a property), and this one works without error:
with xType = dtNewObject {206} in ReadObject.
Is it a bug with StringArray properties?
I have an issue reading a property declared as array of strings.
My unit (generated by CrossTalk ClassGen) contains a property AllIDs: StringArray read AllIDsRead:
Code:
function SelectionChangedEventArgs.AllIDsRead: StringArray;
begin
with TRight.GetPropValue(Self, '', 'AllIDs') do try
Result := NET.mscorlib.StringArray(Results.ReadObject);
finally Free; end;
end;
When this function is called, I get an exception from:
\CrossTalk\Source\Atozed.CrossTalk.Streams.pas
function TCTStreamReader.ReadObject(aClass: TClass = nil): TObject;
-> raise ECTException.Create('Unknown type found during unboxing.');
because xType = dtObjectList {205}
I also have a function returning an StringArray (not a property), and this one works without error:
Code:
function FAL_GAN_LINK.GetAllDataRecordsIds: StringArray;
begin
with TRight.MethodCall(Self, '', 'GetAllDataRecordsIds', 0) do try
Result := NET.mscorlib.StringArray(Results.ReadObject);
finally Free; end;
end;
with xType = dtNewObject {206} in ReadObject.
Is it a bug with StringArray properties?