reset

reset() updating;

The reset method of the Iterator class restarts an iteration. After this method, the following next method invocation starts at the first entry in the collection or the next back method invocation starts at the end of the collection. The following example shows the use of the reset method.

load() updating;
begin
   self.centreWindow;
   self.iter := app.myCompany.allCustomers.createIterator;
   self.iter.reset;
   self.iter.next(cust);
   if cust <> null then
      textBoxName.text    := self.cust.name;
      textBoxAddress.text := self.cust.address;
      textBoxContact.text := self.cust.contact;
      listBoxCustomers.listCollection(app.myCompany.allCustomers, true, 0);
      listBoxCustomers.listIndex := 1;
   else
      textBoxName.text := " No Customer Instances";
   endif;
end;