2,875
edits
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
function Enumerator:moveNext() | function Enumerator:moveNext() | ||
mw.log('calling broken func') | |||
error('Not implemented in base class.') | error('Not implemented in base class.') | ||
end | end | ||
Line 46: | Line 47: | ||
function TableEnumerator:moveNext() | function TableEnumerator:moveNext() | ||
mw.log('calling override with') | |||
mw.log('key: ' .. self.index) | |||
mw.log('val: ' .. self.current) | |||
-- Grab the next index for the internal table. | -- Grab the next index for the internal table. | ||
local key = self.index | local key = self.index | ||
Line 52: | Line 56: | ||
-- If the index exist, we have succesfuly moved to the next. | -- If the index exist, we have succesfuly moved to the next. | ||
if key then | if key ~= nil then | ||
self.current = self.data[key] | self.current = self.data[key] | ||
return true | return true | ||
end | end |
edits