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.
IndexProcessing DevelopmentCore,  Processing Development Environment (PDE) › "Java mode" differences 1.0.9 vs 1.1
Page Index Toggle Pages: 1
"Java mode" differences 1.0.9 vs 1.1 (Read 1635 times)
"Java mode" differences 1.0.9 vs 1.1
Apr 29th, 2010, 7:13am
 
The behavior of "Java mode" sketches run from the PDE seems to have changed in 1.1 vs 1.0.9.

Probably most easily described with code:

Quote:
/** TestJavaMode.pde */
public class TestJavaMode extends PApplet {
  static boolean isApp = false;
  static public void main(String args[]) {
    isApp = true;
    PApplet.main(new String[] {"TestJavaMode"});
  }
  void setup() {
    size(800,600);
  }
  void draw() {
    background(isApp ? #FF0000 : #00FF00);
  }
}


Results with 1.0.9:
pde run:  green
pde present: green
export applet:  green
export application:  red

Results with 1.1:
pde run:  red
pde present: red
export applet:  green
export application:  red

That is, sketches run from PDE 1.0.9 "behave" as applets, but when run from PDE 1.1 "behave" as applications.

I can't find a mention of this in the change log, and am not sure if this is by design or by accident, so am asking here rather than posting as a bug.  Does anyone know the cause/reason/intent of this difference?  Thx

(btw, it's not a huge deal, but i used to use this difference to flag "dev mode" in applet-style from the pde, then flag "production mode" when run application-style outside pde, just seeking insight into how i might continue doing something similar now that pde runs are as application)
Re: "Java mode" differences 1.0.9 vs 1.1
Reply #1 - Apr 29th, 2010, 8:04am
 
ahh, nevermind (i think), looks like it's this that did it:
http://dev.processing.org/bugs/show_bug.cgi?id=1446
Page Index Toggle Pages: 1