<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">Hi,<br>
<br>
<div class="moz-cite-prefix">On 14.10.19 15:44, Ryan Joseph wrote:<br>
</div>
<blockquote type="cite"
cite="mid:A7D587DB-0A41-4339-861A-E56751C9AE9F@gmail.com">
<pre class="moz-quote-pre" wrap="">var
it: pointer;
obj: TObject;
begin
for it in list do
begin
obj := TObject(it);
// continue on like before using “obj” instead of “it"
end;
That’s our realistic best use case now but it requires 2 extra steps. I hope there’s a better solution to keep the for-in loops as easy to use as before.
</pre>
</blockquote>
</div>
<div><br>
</div>
<div>you could do</div>
<div><br>
</div>
<div>
<pre class="moz-quote-pre" wrap="">var
it: pointer;
obj: TObject absolute it;
begin
for it in list do
begin
// continue on like before using “obj” instead of “it"
end;
</pre>
</div>
<div><br>
Cheers,<br>
Benito </div>
<br>
</body>
</html>