I seek to add a file browser to my application. I see that the selectOutput, and selectInput, classes were made for it. In this document for selectOutput: https://processing.org/reference/selectOutput_.html
I see constructor overloads that I cannot find documentation on. These are:
I cannot find any documentation for the file, callbackObject, parent, and sketch, parameters.
My guess is that the “file” parameter is the default directory the file browser starts in. I have no guess for what the callbackObject, parent, and sketch, parameters are there for, and how to use them. Where is complete documentation for the selectInput, and selectOutput, classes that include a description of those four right most optional parameters?
If we invoke the overloaded version w/ just 2 parameters, we’ll get a nullFilefile and a thisObjectcallbackObject when it reaches the overloaded version w/ 4 parameters:
Then the overloaded version w/ 4 parameters invokes the 1 w/ 6 parameters, passing null for Frameparent and this for PAppletsketch:
Given selectOutput() is a method from class PApplet, the keyword this holds a reference for the current instance of it; which is our sketch.
It means by default the parameter Stringcallback represents the name of some public void (File) method inside our sketch.
If we instead need for it to callback a method name belonging to some other class, we can use any overloaded version w/ 4 or more parameters, passing the instance of the target class as the argument for the parameter ObjectcallbackObject.