Hey Thomas, can you take a look at this and tell me if this is how you intended for iteration through a List to be done? The objects symbols and childScopes are List objects.
METHOD PUBLIC VOID addSymbolsDeep(TABLE symbolRecord BIND):
DEF VAR symbol AS CLASS Symbol NO-UNDO.
symbols:getNthElement(0).
DO WHILE symbols:hasNextElement():
symbol = CAST(symbols:nextElement(), Symbol).
CREATE symbolRecord.
ASSIGN
symbolRecord.symbol = symbol
symbolRecord.progressType = symbol:getProgressType()
.
END.
childScopes:getNthElement(0).
DO WHILE childScopes:hasNextElement():
CAST(childScopes:nextElement(), SymbolScope)
:addSymbolsDeep(TABLE symbolRecord BY-REFERENCE).
END.
END METHOD.
Looks right on a quick read.
Looks right on a quick read. Of course, I haven't actually used these in quite a while since my orientation is more toward type-specific set objects these days.