Difference between revisions of "ObjectIterator"

From Xojo Documentation

m
 
Line 21: Line 21:
  
 
<rbcode>
 
<rbcode>
Dim o As Runtime.ObjectIterator = Runtime.IterateObjects
+
Var o As Runtime.ObjectIterator = Runtime.IterateObjects
 
While o.MoveNext
 
While o.MoveNext
 
   ListBox1.AddRow(Introspection.GetType(o.Current).Name)
 
   ListBox1.AddRow(Introspection.GetType(o.Current).Name)

Latest revision as of 22:57, 24 July 2019

Class (inherits from Object)

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.

Properties
Current fa-lock-32.png


Methods
MoveNext Reset

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
While o.MoveNext
ListBox1.AddRow(Introspection.GetType(o.Current).Name)
Wend

See Also

Introspection, Runtime modules; TypeInfo class.