Difference between revisions of "Runtime"
From Xojo Documentation
Line 16: | Line 16: | ||
<dynamicTable id="Methods" class="methodTable" title="Methods" columns="2"> | <dynamicTable id="Methods" class="methodTable" title="Methods" columns="2"> | ||
− | {{Method | name=IterateObjects | returntype= | + | {{Method | name=IterateObjects | returntype=[[ObjectIterator]] | prefix=Runtime | newinversion=2008r4 | description=IterateObjects() as Runtime.ObjectIterator
Iterates over the objects in the runtime environment.}} |
</dynamicTable> | </dynamicTable> | ||
Revision as of 22:24, 1 April 2021
Module
Returns information about the current state of the runtime environment. This information can be useful for debugging purposes.
Properties | |||||
|
Methods | |
|
Examples
The following code displays the properties related to individual objects in a multicolumn ListBox and the total amount of memory used in a TextField:
Var lastObjectIndex As Integer = Runtime.ObjectCount - 1
For i As Integer = 0 To lastObjectIndex
Listbox1.AddRow(Runtime.ObjectID(i).ToString)
Listbox1.CellValueAt(ListBox1.LastAddedRowIndex, 1) = Runtime.ObjectClass(i)
Listbox1.CellValueAt(ListBox1.LastAddedRowIndex, 2) = Runtime.ObjectRefs(i).ToString
Next
TextField1.Value = Str(Runtime.MemoryUsed)
For i As Integer = 0 To lastObjectIndex
Listbox1.AddRow(Runtime.ObjectID(i).ToString)
Listbox1.CellValueAt(ListBox1.LastAddedRowIndex, 1) = Runtime.ObjectClass(i)
Listbox1.CellValueAt(ListBox1.LastAddedRowIndex, 2) = Runtime.ObjectRefs(i).ToString
Next
TextField1.Value = Str(Runtime.MemoryUsed)
See Also
ObjectIterator class; System module.