I have delphi 7 running and I face a problem with a method I write:
I have created this method:
procedure TCRMEasyListview.getCheckedList(var ListToFill: TList);
var i: integer;
with Self.Items do begin
for i:=0 to Count-1 do begin
if Items[i].Checked then
ListToFill.Add(@Items[i]); //<-- "Variable Required" compiler error
end; // end of for loop
end; // end of with declaration
end; // end of method
TList adds pointers. So I try to get the pointer for a pointed item. The pointed item is a TEasyItem (so its an object). Strangely I cannot get the compiler to finish without error.
Any suggestions plz?