I’m learning Corona SDK and Lua, and was wondering if one could print out all the properties of a display object. It’s just a table isn’t it? I thought one could do:
local ball = display.newImage( "orange\_clear\_ball\_75.png" )
ball.x = math.random( display.contentWidth ) --Just putting it somewhere on the screen for fun
ball.y = -ball.contentHeight + 150
for key,value in pairs(ball) do
print( key, value )
end
But the output are just some memory addresses (of something called “proxy userdata”, and the class table):
_proxy userdata: 0x1bd371f4
_class table: 0x17d687f0
Curious minds want to know.
Eric [import]uid: 128346 topic_id: 23378 reply_id: 323378[/import]