Running PApplet as instance?
in
Integration and Hardware
•
2 years ago
Hey there,
probably someone already asked that question - unfortunately I didn't find it. I saw similiar approaches like the following in code sniplets trying to integrate processing and swt, but they all didn't work. So here is what I want to achieve (working with Eclipse):
I got a class "View" which extends PApplet. I want to instantiate an object of Type view, then do something with it, e.g. assigning some variables stored in view etc. and AFTER ALL, starting view, so it shows the normal Applet or even better: the normal application (-mode).
A sketch:
View v = new View();
v.setVar("foo");
v.init();
v.show(); //now the graphical output should be displayed.
Another way to achieve what I want would be to get the instance of "View" this method creates:
PApplet.main(new String[] { "--present", "view.View" });
Any clue? Is something like this possible with processing? I'm looking for a good lib for easy output and visualisation.
Thanks very much in advance!
Chris
probably someone already asked that question - unfortunately I didn't find it. I saw similiar approaches like the following in code sniplets trying to integrate processing and swt, but they all didn't work. So here is what I want to achieve (working with Eclipse):
I got a class "View" which extends PApplet. I want to instantiate an object of Type view, then do something with it, e.g. assigning some variables stored in view etc. and AFTER ALL, starting view, so it shows the normal Applet or even better: the normal application (-mode).
A sketch:
View v = new View();
v.setVar("foo");
v.init();
v.show(); //now the graphical output should be displayed.
Another way to achieve what I want would be to get the instance of "View" this method creates:
PApplet.main(new String[] { "--present", "view.View" });
Any clue? Is something like this possible with processing? I'm looking for a good lib for easy output and visualisation.
Thanks very much in advance!
Chris
2