omar
YaBB Newbies
Offline
Posts: 4
MA
Dynamic Variable Adjustments - New Package
Sep 15th , 2006, 6:16am
Hello all, I have been learning Processing in the past couple of weeks. I found that I wanted to make changes to the values of variables to see the effect on my program. I was keeping these values in constants, but it was time consuming to close the applet, modify the constant, and then restart the applet. I wanted to see the effects of manipulating variables instantly. To solve this, I wrote a package that is very simple to use to change the values of variables on the fly. All you have to do is include the package, name the variables you want access to with a prefix, and include a call a static method in the draw method. OMenu reads the code, extracts the appropriate variables based on the name, and gives you an interface to modify those variables. Unfortunately, it will not run in the applet. I am using reflection to get a list of all the variables in the PApplet. This seems to work fine when I run through the IDE, but when I run the exported applet in a browser, I see lots of access violations. I assume it’s the security settings of Applet. In any case, I find this tool invaluable for development. Please send me any suggestions or comments. I threw up a webpage with instructions on how to use the package as well as the .jar file and the source code at http://mythmar.homelinux.com/proapplet . Everything is still a little rough, which is fine for my usage, but if people are interested, I'll try to clean up the interface and package. Also, please let me know if you have any suggestions or comments. -Omar