We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello. I'm working processing on Eclipse IDE.
Currently, I have 2 main thread, one from normal Java Application, and the other from PApplet. Problem is that, when I call PApplet main method , I need to pass Objects, for example:
public static void main(String args[],Object obj) {
PApplet.main(Object obj, new String[] {"Visualization.Test"});
}
Or, is there a possible way to pass references to PApplet not using static variable?
Answers
PApplet's "igniter" main() can at most pass the extra String[]'s elements after "sketch_name" as args[]:
To pass references rather than simple String args[], you need to replace main() w/ runSketch().
Using the latter, we pass a PApplet object. Therefore that PApplet can have a constructor w/ parameters!
http://forum.Processing.org/two/discussion/12319/using-papplet-runsketch-to-create-multiple-windows-in-a-ps3-sketch