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 & HelpPrograms › What's wrong here
Page Index Toggle Pages: 1
What's wrong here? (Read 593 times)
What's wrong here?
Jan 15th, 2008, 4:33pm
 
Hi!

First post here. I hope I addressing my question in the right place. I started with Processing just a few hours ago and I'm having an small problem with my sketch.

My sketch is simple. It draws a parametrical mathematical function (the response of a second order system to a unit step, if you are interested). The parametres are z and tao. When one of them changes, the function is redrawn. To change both parametres I use two sliders from the library ContolP5.

The sketch works fine when I run it from the Processing IDE. The problem is when I export it. The exported version draws the function, but it doesn't redraw it when I change the parametres using the sliders.

The exported version of the sketch is here:  http://web.udl.es/usuaris/w3511782/applet/

My OS is Kubuntu 7.10. The versión of Processing is 0135BETA and:

javier@javier-desktop:~$ java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

Any help will be greatly appreciated. Thanks,

Javier
Re: What's wrong here?
Reply #1 - Jan 17th, 2008, 3:08pm
 
i'm fairly new to processing too, but you could try calling noLoop() in your setup() method.  i think this is mean the program will only update the draw when the redraw() is called in the slider() method.
just a suggestion.
Re: What's wrong here?
Reply #2 - Jan 17th, 2008, 4:48pm
 
Thanks for the help. But it doesn't work Sad

If I put noLoop(), the sketch is executed only once (I think) and nothing happens. The sliders don't work.

The funny thing is that the applet works fine if I run it from a terminal using:

java -jar _2o_Orden.jar

Probably it will work in Windows or Mac OS X just double clicking on it. You can get the jar file from here:

http://web.udl.es/usuaris/w3511782/applet/_2o_Orden.jar

This is driving me crazy. It is so simple that I can't understand why it doesn't work.

Javier
Re: What's wrong here?
Reply #3 - Jan 17th, 2008, 5:27pm
 
that .jar works fine on mac osx. what OS are u running?
Re: What's wrong here?
Reply #4 - Jan 17th, 2008, 5:49pm
 
I'm using Kubuntu 7.10, a Linux distribution based on Ubuntu.

Why does it work alone but refuses to work inside the browser? I'd like to know...
Re: What's wrong here?
Reply #5 - Jan 17th, 2008, 6:05pm
 
Just look at the Java Console when the applet is running:

Code:
ControlP5 0.2.7 infos, comments, questions at http://www.sojamo.de/controlP5
### WARNING @ ControlP5.invokeField java.lang.IllegalAccessException: Class controlP5.ControlBroadcaster can not access a member of class _2o_Orden with modifiers ""
### WARNING @ ControlP5.invokeField java.lang.IllegalAccessException: Class controlP5.ControlBroadcaster can not access a member of class _2o_Orden with modifiers ""
### WARNING @ ControlP5.invokeField java.lang.IllegalAccessException: Class controlP5.ControlBroadcaster can not access a member of class _2o_Orden with modifiers ""
.. etc etc etc
Re: What's wrong here?
Reply #6 - Jan 17th, 2008, 6:26pm
 
Thank you. How could I forget the Java console? :-O

It seems that the problem is the ControlP5 library so I will formulate my question in the Libraries subforum. Here:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=LibraryProblems;action=display;num=1200591394

Thanks,

Javier
Page Index Toggle Pages: 1