The macro do-collection-items can be used to iterate over the items or an interface that implements the Collection protocol. If the collection items are interface pointers, they must be released when not needed.
For example, to iterate over the
Table
objects from the
Tables
collection of a
MyDocument
interface pointer
(with-temp-interface (tables)
(call-dispatch-get-property
(doc my-document tables))
(do-collection-items (table tables)
(inspect-the-table table)
(release table)))