MCPcopy Index your code
hub / github.com/processing/processing / insideSettings

Method insideSettings

core/src/processing/core/PApplet.java:936–950  ·  view source on GitHub ↗

@param method "size" or "fullScreen" @param args parameters passed to the function so we can show the user @return true if safely inside the settings() method

(String method, Object... args)

Source from the content-addressed store, hash-verified

934 * @return true if safely inside the settings() method
935 */
936 boolean insideSettings(String method, Object... args) {
937 if (insideSettings) {
938 return true;
939 }
940 final String url = "https://processing.org/reference/" + method + "_.html";
941 if (!external) { // post a warning for users of Eclipse and other IDEs
942 StringList argList = new StringList(args);
943 System.err.println("When not using the PDE, " + method + "() can only be used inside settings().");
944 System.err.println("Remove the " + method + "() method from setup(), and add the following:");
945 System.err.println("public void settings() {");
946 System.err.println(" " + method + "(" + argList.join(", ") + ");");
947 System.err.println("}");
948 }
949 throw new IllegalStateException(method + "() cannot be used here, see " + url);
950 }
951
952
953 void handleSettings() {

Callers 3

pixelDensityMethod · 0.95
fullScreenMethod · 0.95
sizeMethod · 0.95

Calls 2

joinMethod · 0.95
printlnMethod · 0.45

Tested by

no test coverage detected