Actually get the same error when all I have in main.lua is the following. Maybe a bug or a change in API on the recent daily build I have?
Is there a way to show all function methods on an object? (should the below code show functions?
local options = {width = 40,height = 34,numFrames = 2, sheetContentWidth = 40,sheetContentHeight = 68}
local chest\_imageSheet = graphics.newImageSheet( "media/images/chest\_imageSheet.png", options )
-- oldChest = display.newImageRect(scene.view, chest\_imageSheet, 1, 40, 34 )
oldChest = display.newImageRect(chest\_imageSheet, 1, 40, 34 )
oldChest:setReferencePoint( display.TopLeftReferencePoint )
oldChest.x, oldChest.y = display.contentWidth \* 0.55, display.contentHeight \* 0.75
oldChest:setFrame(2) -- TODO: testing - delete afterwards
-- ==\> attempt to call method 'setFrame' (a nil value)
function dump(path,t,depth)
for k,v in pairs(t) do
print(path..k..' = ', v, " ", type(v))
if (type(v) == "table") then
if depth \<= 0 then return end
dump(path..k..'.',v,depth-1)
end
end
end
Actually “Utils.dump(“oldChest :”, oldChest, 5)” gives the following:
oldChest :\_proxy = userdata: 0xbbb6414 userdata
oldChest :\_class = table: 0x181c740 table
oldChest :\_class.removeEventListener = function: 0x18f0570 function
oldChest :\_class.initProxy = function: 0x18f0550 function
oldChest :\_class.addEventListener = function: 0x18dee20 function
oldChest :\_class.\_\_index = table: 0x181c740 table
oldChest :\_class.\_\_index.removeEventListener = function: 0x18f0570 function
oldChest :\_class.\_\_index.initProxy = function: 0x18f0550 function
oldChest :\_class.\_\_index.addEventListener = function: 0x18dee20 function
oldChest :\_class.\_\_index.\_\_index = table: 0x181c740 table
oldChest :\_class.\_\_index.\_\_index.removeEventListener = function: 0x18f0570 function
oldChest :\_class.\_\_index.\_\_index.initProxy = function: 0x18f0550 function
oldChest :\_class.\_\_index.\_\_index.addEventListener = function: 0x18dee20 function
oldChest :\_class.\_\_index.\_\_index.\_\_index = table: 0x181c740 table
oldChest :\_class.\_\_index.\_\_index.\_\_index.removeEventListener = function: 0x18f0570 function
oldChest :\_class.\_\_index.\_\_index.\_\_index.initProxy = function: 0x18f0550 function
oldChest :\_class.\_\_index.\_\_index.\_\_index.addEventListener = function: 0x18dee20 function
oldChest :\_class.\_\_index.\_\_index.\_\_index.\_\_index = table: 0x181c740 table
oldChest :\_class.\_\_index.\_\_index.\_\_index.\_\_index.removeEventListener = function: 0x18f0570 function
oldChest :\_class.\_\_index.\_\_index.\_\_index.\_\_index.initProxy = function: 0x18f0550 function
oldChest :\_class.\_\_index.\_\_index.\_\_index.\_\_index.addEventListener = function: 0x18dee20 function
oldChest :\_class.\_\_index.\_\_index.\_\_index.\_\_index.\_\_index = table: 0x181c740 table
[import]uid: 140210 topic_id: 18670 reply_id: 106462[/import]