I’d like to travese the contents of an xml.collected() in a reverse order. I
have
for connectionFromXML in xml.collected(viewFromXML,"/connection") do
parseXMLConnection( rootFromXML, connectionFromXML, viewFromXML,
rootFromOverrideXML)
end
I tried:
local relationTable = xml.collected(viewFromXML,"/connection")
for i=#relationTable, 1, -1 do
connectionFromXML = relationTable[i]
parseXMLConnection( rootFromXML, connectionFromXML, viewFromXML,
rootFromOverrideXML)
end
But apparently my lua knowledge is lacking (severely, I might say) as this ends
with “attempt to get length of a function value “
What is the correct way to do it?
G
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________