Why can’t I add an event 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. Please explain, thanks!
[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: 8029 reply_id: 308029[/import]