add createXML()

This commit is contained in:
benfry
2012-12-19 23:20:41 +00:00
parent d01e7b5b7e
commit 26b08fb8aa
2 changed files with 22 additions and 2 deletions
@@ -4151,6 +4151,16 @@ public class PApplet extends Activity implements PConstants, Runnable {
// DATA I/O
public XML createXML(String name) {
try {
return new XML(name);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* @webref input:files
* @param filename name of a file in the data folder or a URL.
+12 -2
View File
@@ -1371,9 +1371,9 @@ public class PApplet extends Applet
// This will crash with OpenGL, so quit anyway
if (g instanceof PGraphicsOpenGL) {
PGraphics.showWarning("Stopping the sketch because this code will " +
"not work correctly with OpenGL.");
"not work correctly with OpenGL.");
throw new RuntimeException("This sketch uses a library that " +
"needs to be updated for Processing 2.0.");
"needs to be updated for Processing 2.0.");
}
}
}
@@ -5813,6 +5813,16 @@ public class PApplet extends Applet
// DATA I/O
public XML createXML(String name) {
try {
return new XML(name);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* @webref input:files
* @param filename name of a file in the data folder or a URL.