Something like this I am looking for:
[lua]
local obj1 = display.newImage(…)
local obj2 = display.newImage(…)
obj1.name = “obj1”
obj2.name =“obj2”
local function printSelf(self)
print(self.name)
end
obj1.printSelf() – should print “obj1”
obj2.printSelf() – shoould print “obj2”
[/lua]