How to Access Class Properties in While Loop

Thank you. But if I call test() from draw, it takes me into a loop that it shouldn’t yet. And bypassing the whole point of the EventHandler, which is only to respond when the person clicks a button.

It should only enter the loop if the user clicks the button, as dictated in the EventHandler.

Plus still, even if you put it directly in draw(), you’d be trapped in the loop. So this doesn’t work I’m afraid.