diff --git a/android/core/src/processing/core/PApplet.java b/android/core/src/processing/core/PApplet.java index 4e6706bf0..1c5aa61c7 100644 --- a/android/core/src/processing/core/PApplet.java +++ b/android/core/src/processing/core/PApplet.java @@ -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. diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 47bc1d3b8..7b89698fd 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -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.