Hi, is there a way to get he ID of a display object?
When I print the object to the terminal, it shows something like
table: 0x4bc8d0
I just want to get the "0x4bc8d0" as a string
thanks
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Hi, is there a way to get he ID of a display object?
When I print the object to the terminal, it shows something like
table: 0x4bc8d0
I just want to get the "0x4bc8d0" as a string
thanks
Maybe something like: tableString = tostring(myObject)
thanks for the quick reply Tim!
I'm so dumb
No problem, if you want a human readable string rather than the table string, you could name the object like:
1 2 3 | local myRectangle = display.newRect(0, 0, 150, 50) myRectangle.name = "myName" print(myRectangle.name) |