Sometimes I get an error when exporting Applets in P107.
The error is:
Error while exporting
It happens only sometimes, and this occurred while using this code:
Code:
import processing.opengl.*;
import saito.objloader.*;
public class P5GE extends PApplet {
OBJModel m;
String words = "apple bear cat dog";
String list[] = split(words);
static public void main(String args[]) {
PApplet.main(new String[] { "--present","--bgcolor=#000000","--present-stop-color=#000000","P5GE"});
}
// Setup
void setup(){
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
size(screen.width,screen.height,OPENGL);
// m =
}
// Main loop
void draw() {
background(mouseX,mouseY,(mouseX+mouseY)/2);
if ( mousePressed ) { saveStrings("nouns.txt", list); }
}
}
The red error messages didn't tell me much, and the bug is only reproducable only some of the time. It happened when I tried to export and the name of the file was not the same as the class. It might be nice to add some functionality that supports extending PApplet such that you wouldn't have to write the above code "public class <name> extends PApplet",
perhaps a special symbol that could appear after "import"
Code:
extend PApplet {
static ... void main() { ... }
}