Why can’t I add a method to an array element yet I am able to do so for the same object by another reference? I assume I have a syntactical error. Originally posted this on the wrong forum so I hope I get more of a response here
[lua]myRect = {};
myRect[1] = display.newRect(0, 0, 100, 100)
mR = myRect[1];
– both reference the same table
print ( myRect[1] )
print ( mR );
function mR:tap (event) end; --this works!
function myRect[1]:tap (event) end; --this doesn’t work![/lua] [import]uid: 40932 topic_id: 8046 reply_id: 308046[/import]