【发布时间】:2017-07-30 22:03:47
【问题描述】:
我在 Delphi 10.0 Seattle 中将 TObject 值添加到 FireMonkey TListBox 时遇到问题。
将Integer 变量转换为TObject 指针时引发异常。
我尝试将演员转换为TFmxObject,但没有成功。在 Windows 上,演员表就像一个魅力,但在 Android 上却引发了例外。
这是我的代码:
var
jValue:TJSONValue;
i,total,id: integer;
date: string;
begin
while (i < total) do
begin
date := converteDate(jValue.GetValue('date' + IntToStr(i), ''));
id := StrToInt(jValue.GetValue('id' + IntToStr(i), ''));
ListBox1.Items.AddObject(date, TObject(id));
i := i + 1;
end;
end;
【问题讨论】:
标签: android delphi listbox firemonkey tobject