Basically, I need to know what button was pressed. Or to pass the name of the button out.
Yes, I did it like this. But I tried to pass a button name out so I know what button is pressed. If I do it like this I get only the last button name out.
I tried to replicate closure but not successfully. I need to catch each variable of a button so that when it is pressed I get its name.