I’ve been trying implement GSpinner but having an issue. Easily replicated in the G4P Example Numerical Input unmodified.
Load and run the G4P_NumericalInput example. Click on the up down spinner object. Number gets updated on the screen immediately, but the number displayed on the console message is the number before the change.
My symptoms are the same, I can see the number updated on the GUI but actions happen based on the previous number. How does one work on the current spinner number, not the previous?
I have just uploaded version G4P V4.3.8 and it should be available in the Contributions Manager within a couple of days.
This version fixes the bug in the source code and made a slight change to the example code. G4P controls fire several types of event and most of the time you don’t have to worry about the event type. Good programming practice says that we should not just check the event source but also the event type. I have done this in the modified example.
Just dragged it off Sourceforge. Works perfectly. Using the spinner number for the Index reference to access specific elements in JSON array. Does exactly what I expected now.