I have a screen with multiple buttons on it. Every button is supposed to show a certain fact. I want to specify by an instance variable which fact every button is supposed to show when I click it.
But what is weird is that whenever I click a button, only the instance variable of the first button on the screen is used, although I assumed it should pick the variable of the button I just clicked.
Here is the code:
This is how the button looks in the editor:
I am confused, because I assumed my intended behaviour is what the instance variables are made for. But for whatever reason, they are all ignored, and just the instance variable value of the first button (and the one with the lowest UID) is picked. Can I do something to fix this?