From Xojo Documentation

Revision as of 19:08, 19 November 2009 by WikiSysop (talk) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Used to iterate over the active objects at runtime. Use the Introspection system to get information on the active objects. Note that ObjectIterator is a Public class of the Runtime module.

Super Class



Name Type Description
Current Object The current object whose TypeInfo is available.


Name Parameters Return Type Description
MoveNext Boolean Moves the iterator to the next object. MoveNext must be called to start the iteration. You can think of the iterator as initially pointing to prior to the first item in the list.
Reset Sets the iterator back to its initial state so that a call to MoveNext will go to the first item in the list.


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

Dim o as Runtime.ObjectIterator=Runtime.IterateObjects
While o.MoveNext
  ListBox1.AddRow Introspection.GetType(o.Current).Name

See Also

Introspection, Runtime modules; TypeInfo class.