Home > Language Reference > Classes > Object
Iterate Event
Event raised to iterate over the elements of a container object.
Syntax
Protected Event Iterate(ByRef objIter As Iterator)
| Parameter | Description |
| objIter | Iterator object returned to the system. |
Remarks
The Iterate event is sent to an object when a For Each...Next loop whose last argument refer to that object is about to be entered. In response to this event, the object should initialize the iteration process, and return an iterator object to the system through the objIter parameter.
If your class is involved into a For Each...Next loop but fails to handle this event, a runtime error occurs. If it handles this event but fails to return a valid iterator in the objIter parameter, no error occurs but the loop is never entered.
For more information about implementing an handler for this event, please refer to the Iterable objects page in the Programmer's guide, or to the Iterators sample that comes with HB++.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |