I have a built couple of apps using G4P to create a GUI that run on Windows and also on macOS. When on the macOS I sometimes have to click a button several times before the app responds. It might be trying to choose an option in a dropdown list or clicking a button that calls a handler function.
In this screen recording from my Mac Mini running macOS Catalina it actually works fine until I click on the green Save Patches button. You can see that I have to click several times before the event handler is called and something actually happens:
@quark, many thanks for your reply. I know the two comparisons were not like-for-like but I already knew that the problem is the same on OSx even when the sketch is run in Processing (see new video link below).
On OSx Processing is V3.5.4 and G4P is V4.3.6
On Windows it’s V3.5.4 and V4.3.8 so a difference there.
The code is written on the Windows machine and then transferred via iCloud to the Mac for exporting.
I am using Java mode.
Here’s the sketch running in Processing 3.5.4 on the Mac. This time notice that I had to click on the dropdown button twice before the list opened (not too bad) but then it took several clicks on the entry before it was registered by G4P. The two other button clicks worked fine this time. The behaviour is not consistent, sometimes everything works first click, other times it can take several clicks. The droplist seems to be the worst but maybe that’s because it is more annoying!
I also decided to try a simpler sketch, written on OSx Catalina. I haven’t G4P updated to 4.3.8 yet.
Why does the droplist not collapse when I have chosen an option? This means that when I want to select a different option I have to click the list button again before it will register the new selection. This seems ‘unnatural’ when the user can still see the options in the list. No doubt I am missing something! EDIT: I was stupid. Forgot to put a background() call in draw().
I have tried your simple sketch and created some of my own but I can’t reproduce the problem you are experiencing so I have no idea whats causing it. Sorry.
Sorry to revive this thread, but I noticed the same with my mac.
edit: It seems that I don’t have the same issue. I had the some not-responding to clicks, but then again, with Big Sur, even the menus opened by macOS seem to sometimes go the wrong screen.
Sorry for wasting time and space.
However, upon further investigation my issue turned out to be mostly the following:
-if the cursor moves even a pixel while clicking, G4P does not interpret that as a click.
-if one manages to click very carefully, so that the cursor is not moving, then G4P always correctly interpretes that as a click
-it is increasingly challenging with a high screen resolution and a touchpad
My suggestion would be to augment the eventhandling so that it does not care if the cursor moves a bit, as long as the start and the end are both on top of what is being clicked.
Also, is there a mouseOver for buttons? They do react to mouse-over, but I would really fancy an event from just having the cursor over a button. Now I’m doing it manually with mouseX+mouseY, and that kind of defeats the purpose of having G4P in the first place.
Otherwise G4P is quite nice, so thank you @quark for that.