Thank you mnse. I absolutely do need this functionality. The while loop is absolutely necessary - I’m waiting for serial response from an external device. Without the while loop, it will never receive the message.
And I can’t stick everything into the draw() method; it would be incredibly messy and hard to maintain. I want discrete blocks of code.
This is how I’ve done it, successfully, on a large app in the Arduino environment, which also has the “loop()” function. I make other while loops in other voids, and I’m able to exit the loops easily with changes in variables.
But from what you’re saying, I can’t do that with Processing?
I am starting to think that, as cool as processing is, it’s not meant for really making robust applications. I’m starting to think it’s just a learning tool. Which it excels at.
I tried to read the observer pattern link, but it’s incredibly complicated. If I need to do all this, I’m starting to think I may as well use full blown java, which boasts the swing and javafx libraries to handle mundane and incredibly basic things like buttons and sliders and event handling.
And yes, I’ve looked into G4P and Control5P. Both are great; I think G4P is incredibly great actually. But I wanted some functionality that it does not provide easily. Well, I can think of an incredibly clunky way to get what I need, but I’'m loathe to implement it. Using G4P toggle buttons with 32 states - and 32 images of numbers so the font is preserved. Ug! Ugly…
If anyone knows another way to get around the issue I’ve shared here, please let me know.
Thanks,
Mike