Is there a way to identify the object which called an event listener?

Hello,

I am creating 5 buttons, each of which trigger similar behavior, but with different values (i.e. each has its own range). I would like to create one touch function which identifies the button that was pressed, and can then use that value to take the appropriate steps. I saw an old post claiming that this could be done with event.target.caller, but that always seems to return nil. Is there a way to do this which I am somehow overlooking?

Thanks,
David [import]uid: 226195 topic_id: 36480 reply_id: 336480[/import]

[lua]button1.tag = 1[/lua] or [lua]button1.tag = “first button”[/lua]

then in listener check [lua] event.target.tag[/lua] [import]uid: 138389 topic_id: 36480 reply_id: 144738[/import]

Thanks! [import]uid: 226195 topic_id: 36480 reply_id: 144792[/import]

[lua]button1.tag = 1[/lua] or [lua]button1.tag = “first button”[/lua]

then in listener check [lua] event.target.tag[/lua] [import]uid: 138389 topic_id: 36480 reply_id: 144738[/import]

Thanks! [import]uid: 226195 topic_id: 36480 reply_id: 144792[/import]

[lua]button1.tag = 1[/lua] or [lua]button1.tag = “first button”[/lua]

then in listener check [lua] event.target.tag[/lua] [import]uid: 138389 topic_id: 36480 reply_id: 144738[/import]

Thanks! [import]uid: 226195 topic_id: 36480 reply_id: 144792[/import]

[lua]button1.tag = 1[/lua] or [lua]button1.tag = “first button”[/lua]

then in listener check [lua] event.target.tag[/lua] [import]uid: 138389 topic_id: 36480 reply_id: 144738[/import]

Thanks! [import]uid: 226195 topic_id: 36480 reply_id: 144792[/import]