This document covers the following topics:
The ActiveX component
SoftwareAG.NaturalX.Enumerator
provides a general
enumerator class that can be used to iterate across collections of Automation
objects.
As an example, the general usage of the component in a Natural
application is in the following way. A full working example is the program
UTIL04
in the library SYSEXPG
.
define data local 1 #enum handle of object 1 #files handle of object 1 #file handle of object end-define * * First create an instance of the class SoftwareAG.NaturalX.Enumerator. create object #enum of 'SoftwareAG.NaturalX.Enumerator.5' if #enum eq null-handle escape routine end-if * * Have a collection of Automation objects * in the variable #files. * Code omitted. * ... * * Attach the collection to the enumerator. send 'Attach' to #enum with #files (ad=o) * * Now iterate across the collection. send 'Next' to #enum return #file repeat while #file ne null-handle * Process the item. * Code omitted. * ... * Get the next item. send 'Next' to #enum return #file end-repeat * end
The interface of this component, its methods and their usage are described in detail in a separate document.
The component provides the following interface: