Repeating procedure for every item in class

Posted by Hendriksen123 on Stack Overflow See other posts from Stack Overflow or by Hendriksen123
Published on 2010-04-13T13:26:50Z Indexed on 2010/04/13 22:33 UTC
Read the original article Hit count: 300

Filed under:
|
|
|
  Data.XX.NewValue := Data.XX.SavedValue;
  Data.XX.OldValue := Data.XX.SavedValue;

I need to do the above a large number of times, where XX represents the value in the class. Pretending there were 3 items in the list: Tim, Bob, Steve. Is there any way to do the above for all three people without typing out the above code three times?

(Data is a class containing a number of Objects, each type TList, which contain OldValue, NewValue and SavedValue)

© Stack Overflow or respective owner

Related posts about delphi

Related posts about classes