Created
April 5, 2012 17:30
-
-
Save JesterXL/2312710 to your computer and use it in GitHub Desktop.
Reflect/iterate over tables in Lua for debug purposes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Iterates over tables in Lua to help you identify what they are. | |
Examples: | |
showProps(self) | |
showProps(_G) | |
]]-- | |
function showProps(o) | |
print("-- showProps --") | |
print("o: ", o) | |
for key,value in pairs(o) do | |
print("key: ", key, ", value: ", value); | |
end | |
print("-- end showProps --") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment