I met following error message in the start of the application. But it still runs and receives no more error message during running.
Sep 12, 2012 2:24:38 AM controlP5.ControlBroadcaster printMethodError
SEVERE: An error occured while forwarding a Controller event, please check your code at controlEvent
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at controlP5.ControlBroadcaster.invokeMethod(Unknown Source)
at controlP5.ControlBroadcaster.broadcast(Unknown Source)
at controlP5.CheckBox.updateValues(Unknown Source)
at controlP5.CheckBox.updateValues(Unknown Source)
at controlP5.CheckBox.activate(Unknown Source)
at BoKVis.setup(BoKVis.java:338)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at BoKVis.controlEvent(BoKVis.java:540)
... 13 more
When I commented the line (checkAnimation.activate(0)), the error msg is gone. This is in the setup(). But I need to activate it.
We have used processing for more than one year to work on a pretty large project for visualization of knowledge.
It seems like the application now usually occupies 260 mb memory. We still need to export this to an applet to use online. So is there any way to optimize the application?
Use less global and local variables? Optimize each line of code?
It's really wired that after running normally to some moment. All the elements in controlP5 stops working and they can be dragged away.
At first, they are fixed in their positions.
And there is a message come "
controlP5.controlP5IOHandler save INFO: controlP5 writing file data/controlP5.xml to disk". It wrote controlP5 config file into a xml. However, I haven't used ControlP5.load() function. I added each button and text input field myself by using like "addRadioButton()".
I found the Ani is a very useful library in animation. However, I need the animation happens in many different variables at the same time, like I need to make many different rectangles change their width, height and location at the same time. Anyone got any suggestions?
I found the BoundsIntegrator.java from Ben Fry's book. The animation between two zooms seem good. Can I apply this kind of zooming action to other visualization?
I have initial coordinate of a rectangle (x,y,width,height) and want it to be in new coordinate (x1,y1,width1,height1).
Cause I'm a little confused about how Ben did it, I'm not sure how to implement it.
I'm not sure I have clearly expressed my question. So I'd better give some background. In our project, we use processing to display kind of information in different ways. In one of these displaying method, we use a hierarchical tree like way to display from left to right. As there are so many info to be displayed in bottom of the structure, we write a scroll bar to display part of this structure according to users' interests. And actually inside the void draw() method, we have drawn all the whole structure, but only displayed part of it according to the scroll bar and window size.
My question is it displays really slow if there are too many elements. (the most shapes we draw here is rectangle and lines.)
If there is a way to only draw part of the shapes?
Recently, I have participated in a visualization project implemented in processing. I downloaded the codes and ran it successfully in the lab, but when I come home to try to run the code in my own computer. I got the following messages:
No library found for treemap
No library found for controlP5
No library found for rita
As of release 1.0, libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder
So I created a folder named libraries in 'sketchbook' folder, put all the libraries into it. Then ran the project again, I still got the error messages.
Then I tried to create a new .pde file, only wrote one line of code "import controlP5.*;", and put the controlP5 library in the 'sketchbook' folder (which is located at my document/Procssing/***). Ran the project, it still failed.