How to use custom property as a handler?

Hello

I have some groups objects in my game, each with a custom property

for \_,arg in ipairs( arguments ) do  
 local mygroup = display.newGroup();  
 mygroup.id = arg.id   
end  

how to get the handler for any group using the id property?

Many Thanks [import]uid: 8519 topic_id: 11533 reply_id: 311533[/import]

Could you please explain what you mean by handler?

In my apps I’m adding all display objects to an app.sprites table, then grab a single sprite via selector functions like the following (but I don’t know if this is related to what you’re asking):

function appGetSpriteById(desiredId) local desiredSprite = nil if desiredId ~= nil then for id, sprite in pairs(app.sprites) do if desiredId == sprite.id then desiredSprite = sprite break end end end return desiredSprite end [import]uid: 10284 topic_id: 11533 reply_id: 42639[/import]