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 › PApplet class in main tab
Page Index Toggle Pages: 1
PApplet class in main tab (Read 494 times)
PApplet class in main tab
Dec 15th, 2009, 10:17am
 
Hello, the following is from Chapter 14, page 18 of the Ira Greenberg book:

"The PApplet class from the main sketch tab is very significant in Processing, as it's critically tied to Processing's graphic capabilities. Thus, when you work with external Java files, you need a reference to this special PApplet object to be able to call Processing's functions. You accomplish this by passing the keyword this as an argument from the main tab to any external classes that need to use Processing's graphic functions (really, PApplet methods). This is why I added a PApplet reference as the initial parameter to the two constructors in the Bird class."

-Is there a difference between the PApplet class in the main tab and the PApplet class brought into a java class via import processing.core.PApplet?


Re: PApplet class in main tab
Reply #1 - Dec 15th, 2009, 1:25pm
 
No.
Page Index Toggle Pages: 1