We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Create PApplet From Outside Java Class
Page Index Toggle Pages: 1
Create PApplet From Outside Java Class (Read 821 times)
Create PApplet From Outside Java Class
Oct 10th, 2009, 1:49pm
 
Hi! I'm new to the Processing library and am having some trouble and was hoping I could get some help.

I'm writing a project involving multiple classes, several of which do not actually involve the Processing Library. However, at some point during the running of this program it takes advantage of the Java OpenCV library. In order to get the OpenCV parts working properly, I decided to use Processing, as the two tie together very well.

The general framework is like this:

MetaController --> SubController --> OpenCV/PApplet

There is an overarching controller that calls a subthread (subcontroller). SubController periodically opens up new instances of a class that is a PApplet to run OpenCV calls. Once the PApplet is done, it exists entirely and snaps back to the SubController.

My issue is that I can't figure out how to open this third PApplet class from the non-PApplet classes. Is this possible? Any help would be amazing. Thanks!!
Re: Create PApplet From Outside Java Class
Reply #1 - Oct 11th, 2009, 2:20am
 
Quote:
how to open this third PApplet class from the non-PApplet classes

Take a look at PApplet, it shows an example of embedding a PApplet in a Java program.
Re: Create PApplet From Outside Java Class
Reply #2 - Oct 12th, 2009, 7:52am
 
Oh! A dumb question after all.

Thanks!
Page Index Toggle Pages: 1