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 DevelopmentLibraries,  Tool Development › Processing Live Code 0.1
Page Index Toggle Pages: 1
Processing Live Code 0.1 (Read 2567 times)
Processing Live Code 0.1
Aug 14th, 2007, 3:01pm
 
I'd like to get feedback on a tool I quickly knocked up which may be of use (if I can add more features)

ProcessingLiveCode 0.1(use this instead) is a simple app that lets you put code in one window, hit build and have the sketch displayed in the right window.

I am hoping to be bale to add functionality to hide the "import" and "class" lines to make things more processing like, and to copy the screen across from one run to the next, so it's really more live.

Currently the internal window placement sucks, and doesn't seem to like resizing in a nice way, but hopefully a sI get a bit better with Swing I'll be able to improve it.
Re: Processing Live Code 0.1
Reply #1 - Aug 14th, 2007, 5:20pm
 
can you recompile it for us poor java-1.4.x users?

Code:

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass2(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:719)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


thanks,
F
Re: Processing Live Code 0.1
Reply #2 - Aug 14th, 2007, 6:06pm
 
Unfortunately, I don't think so. I believe that the janino library needs 1.5, and I need that for it to work. (Janino is a java compiler written in java)
Re: Processing Live Code 0.1
Reply #3 - Aug 15th, 2007, 12:44pm
 
hmmm .. no, not working. i switched to 1.5 and still gives me:
Code:

SilverTent:~/Desktop/ProcessingLiveCode0.1 fjenett$ java -jar LiveCode.jar

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass2(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:719)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

SilverTent:~/Desktop/ProcessingLiveCode0.1 fjenett$ java -version

java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)


any ideas?

can you outline what's happening behind the curtains in the app? is it a write-compile-run mechanism?

thanks,
F
Re: Processing Live Code 0.1
Reply #4 - Aug 15th, 2007, 3:05pm
 
Unfortunately it seems netbeans found the version of java 1.6 I had lying around fo rtesting, and has decided to use some 1.6 only swing stuff, so it may take me a while to "persuade" it to stop that.

Edit: A-ha! Turns out that janino will work with 1.4, it was my code not degrading nicely. I've built a version that should work with 1.4:
http://www.hardcorepawn.com/LiveCode/ProcessingLiveCode0.1b.zip

AS to how it works, currently it just internalises the compile/run part so that it compiles a PApplet itself, and then runs it in a window. I am hoping to be able to split things up so that you can just edit (say) the draw method, and not have to re-initialize all your objects. I do have a rough idea how to do it, and this was jsut a test to show that it's possible to have a java app dynamicly compile things and rerun them.
Re: Processing Live Code 0.1
Reply #5 - Aug 16th, 2007, 8:55am
 
it works really well on my macbook with the 1.4 version
even resizing works fine for me
copy/pasting works nicely too

if i was to imagine future features what would be really nice would be

- to have an "undo"
- to have code in a separate window altogether (i'm imagining being able to code on one screen while displaying results on another screen)

thanks!
Re: Processing Live Code 0.1
Reply #6 - Nov 2nd, 2007, 9:51pm
 
what am i supposed to do with the jar files i download to get up and running?

Slm
Re: Processing Live Code 0.1
Reply #7 - Mar 24th, 2008, 5:11am
 
very cool thx!

I seem to recall there were some other people trying to get live coding up and running in processing, but potentially an interpreter? I can't really remember that well.

a request... would it be possible to get the text sitting in a layer on top of the output? see: http://www.pawfal.org/fluxus/
Page Index Toggle Pages: 1