Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with StringArray property
#1
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:

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?
Reply


Messages In This Thread
Issue with StringArray property - by Jofreeze - 09-24-2018, 08:29 AM
RE: Issue with StringArray property - by kudzu - 09-24-2018, 05:03 PM
RE: Issue with StringArray property - by Jofreeze - 02-08-2019, 09:20 AM
RE: Issue with StringArray property - by kudzu - 02-11-2019, 03:26 PM
RE: Issue with StringArray property - by Jofreeze - 02-12-2019, 10:08 AM
RE: Issue with StringArray property - by kudzu - 02-12-2019, 01:42 PM
RE: Issue with StringArray property - by kudzu - 02-13-2019, 05:56 PM
RE: Issue with StringArray property - by Jofreeze - 02-19-2019, 03:10 PM
RE: Issue with StringArray property - by kudzu - 02-21-2019, 02:31 PM
RE: Issue with StringArray property - by kudzu - 02-26-2019, 02:19 PM
RE: Issue with StringArray property - by kudzu - 02-26-2019, 04:15 PM
RE: Issue with StringArray property - by kudzu - 02-26-2019, 05:25 PM
RE: Issue with StringArray property - by kudzu - 02-26-2019, 06:58 PM
RE: Issue with StringArray property - by kudzu - 02-26-2019, 09:01 PM
RE: Issue with StringArray property - by kudzu - 03-03-2019, 05:08 PM
RE: Issue with StringArray property - by Jofreeze - 04-09-2019, 12:21 PM
RE: Issue with StringArray property - by kudzu - 04-09-2019, 04:06 PM
RE: Issue with StringArray property - by Jofreeze - 04-10-2019, 06:43 AM
RE: Issue with StringArray property - by kudzu - 04-10-2019, 02:57 PM
RE: Issue with StringArray property - by kudzu - 04-11-2019, 03:56 PM
RE: Issue with StringArray property - by Jofreeze - 04-12-2019, 12:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)