[SOLVED] Is there a reserved word in Processing for accessing the Sketch's root class?
in
Core Library Questions
•
1 year ago
I am saving versions of my sketch as I go along, changing the sketch name when I have a new version i want to save. i.e. sketch_v1_0, sketch_v1_1, sketch_v1_2, etc... I declare static fields and objects in the root class of the sketch (where the setup and draw functions are) and need to access them in other classes and methods, but I would like to not have to traverse my code each time i save to change each occurrence of 'sketch_v1_0' with 'sketch_v1_1' So i was wondering if there was a key/reserved word in processing that would allow me to access the root class without using the actual name. i.e. 'SKETCH' or 'SKETCHNAME' or something else instead of 'sketch_v1_0'. I have tried passing the parent PApplet from the root class to the places i need it but i get an error saying that the variable cannot be resolved or is not a field. Thanks in advance
1