We are about to switch to a new forum software. Until then we have removed the registration on this forum.
in Processing Forum one there is a weird code who work very fine, but I don't understand : https://forum.processing.org/one/topic/start-stop-pause-processing.html
void keyPressed() {
final int k = keyCode;
if (k == 'S')
if (looping) {
noLoop();
} else {
loop();
}
}
Why Processing know the var looping
it declared no where ?
Answers
isLooping() is a boolean method already defined in the Processing core, see here.
ok, so why is not in coloring in the IDE ?
Processing library got lotsa
public
&protected
members (methods & fields) which aren't meant to be "revealed" to us, but for other 3rd-party libraries. :-@Supposedly we should only use those members cited at the "official" reference below: :-\"
https://Processing.org/reference/
Remember that a ".pde" sketch is nothing more than a subclass of class PApplet: L-)
https://GitHub.com/processing/processing/tree/master/core/src/processing/core
For multiple ways of checking the looping status, see also: