Also not what I mean, but I have an alternative to my problem because I am seeing that what I want isn’t possible: Controlp5 - Buttons with private functions by using a private function.
I got found a solution, I had the buttons all be called "doThis" + UID and then added some code that tested if ‘doThis’ was in the name on the listener and ran the code like that.
I have an object that generates buttons with a method, but I want all of those buttons to do the same thing. There is not a finite amount of buttons that could be generated, so I can’t just create a bunch of similar functions with different names to be linked to buttons with different names.
Anyways, I’m a bit confused by your solution, do you mind elaborating on it? Do you perchance have your original code on hand? Any help would be greatly appreciated