I’m a new user of G4P, migrating over from ControlP5. I’m coding my app as native java classes (but still using the Processing 3 IDE). I am simply trying to assign a listener to a specific button control via .addEventHandler( PApplet sketch, String methodName ). This is being called from within one of my classes. The issue I run into is how to specific the name of the listener method since it is defined in my class and not the top level class. I’ve tried fully qualifying the method name but that doesn’t seem to help. And FWIW, I had the same issue in ControlP5 but that library also provides addCallback() methods that allow for listeners to be passed in as objects that implement ControlP5’s ‘listener’ interface, or also as inline anonymously defined listener objects. I am not yet seeing a similar facility in G4P, although again I am new to this library.
Also, in G4P can one setup a listener not just on a specific control but also for a specific type of event? I know that one can code the filtering within their listener but I’m hoping there’s a way to somehow offloaded it to the event framework, like in ControlP5. Thanks in advance