lichtungsgnarr / controlp5

Automatically exported from code.google.com/p/controlp5
0 stars 0 forks source link

ControlP5 error with Processing 2.06 alpha #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. trying to run a ControlP5 example (as an example I used ControlP5button).

What is the expected output? What do you see instead?

Exception in thread "Animation Thread" java.lang.NoSuchFieldError: online
    at controlP5.ControlWindow.<init>(Unknown Source)
    at controlP5.ControlP5.init(Unknown Source)
    at controlP5.ControlP5.<init>(Unknown Source)
    at ControlP5button.setup(ControlP5button.java:48)
    at processing.core.PApplet.handleDraw(PApplet.java:1952)
    at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:187)
    at processing.core.PApplet.run(PApplet.java:1855)
    at java.lang.Thread.run(Thread.java:680)

What version of the product are you using? On what operating system?

ControlP5 0.75 on Processing 2.06 alpha on MacOsX Lion and Snow Leopard with 
Java 6.0_31

Original issue reported on code.google.com by konstant...@gmail.com on 2 Jun 2012 at 9:59

GoogleCodeExporter commented 9 years ago
From the Processing changelog:

"The 'online' boolean has been renamed to 'appletViewer'. The reason is that it 
had nothing to do with whether a sketch was online (i.e. had a net connection), 
but rather it would return true if the sketch was running inside a web browser 
or applet viewer. (Technical version: whether a Java AppletContext existed.) 
This caused some complaints/confusion."

http://wiki.processing.org/w/Changes

Hope this helps.

Original comment by gilbm...@gmail.com on 22 Jun 2012 at 8:54

GoogleCodeExporter commented 9 years ago
I was able to recreate the library in Eclipse, change all (two) instances of 
"_myApplet.online" to "_myApplet.appletViewer", and recompile, and then open 
several examples successfully. It looks like these simple changes (in 
ControlP5.java and ControlWindow.java) did the trick.

Original comment by gilbm...@gmail.com on 22 Jun 2012 at 9:51

GoogleCodeExporter commented 9 years ago
Here's a zip file of the edited and recompiled library for anyone wanting to 
use controlP5 0.7.5 with Processing 2.0a6 in the meantime before a new release. 
(YMMV, this has not been thoroughly tested.)

Original comment by gilbm...@gmail.com on 22 Jun 2012 at 9:54

GoogleCodeExporter commented 9 years ago
Thanks alot for the comments and your recompiling! Cannot find the zip file 
here. Can you upload it again or email it?

Thanks!

Original comment by konstant...@gmail.com on 23 Jun 2012 at 11:44

GoogleCodeExporter commented 9 years ago
Oh yeah, I guess the attachment didn't work. Here's a DropBox link instead:
http://dl.dropbox.com/u/13574910/controlP5.zip

I guess this renamed variable will mean controlP5 will have to have separate 
Processing 1 and 2 versions (since in Java you can't test for the existence of 
a variable; mentioning a non-existent variable at all causes an error at 
compile time).

Original comment by gilbm...@gmail.com on 23 Jun 2012 at 12:08

GoogleCodeExporter commented 9 years ago
thanks man, works like a charm. 

Original comment by rafael.s...@gmail.com on 20 Jul 2012 at 11:36

GoogleCodeExporter commented 9 years ago
the reference to processing's online variable has been removed with 0.7.6 

Original comment by soj...@gmail.com on 26 Aug 2012 at 3:07