ObjectIterator.Reset

From Xojo Documentation

Revision as of 22:57, 24 July 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Method

ObjectIterator.Reset()

Supported for all project types and targets.

Sets the iterator back to its initial state so that a call to MoveNext will go to the first item in the list.

Example

The following example iterates over the objects using a While loop and writes each object's name to a ListBox.

Var o As Runtime.ObjectIterator = Runtime.IterateObjects
o.Reset
While o.MoveNext
ListBox1.AddRow(Introspection.GetType(o.Current).Name)
Wend