Using the GetEnumerator method instead of looking for property Items (only
available in XE2) or GetItem/GetElement (only possible if these methods are
public or published) would make this more flexible and compatible with older
Delphi versions (actually I think DORM should have full XE support).
I was looking if there is some special place where specific items are accessed
but it is always like for i := 0 to list.count -1 do list.GetItem(i)
This could be done with for item in list do if you implement the GetEnumerator
in TDuckTypedList. Then also at least persisting data from a list could done
with TEnumerable instead of having all the extra TList methods.
Original issue reported on code.google.com by sglienke@aagon.com on 2 Dec 2011 at 7:45
Original issue reported on code.google.com by
sglienke@aagon.com
on 2 Dec 2011 at 7:45