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 › Export problems
Page Index Toggle Pages: 1
Export problems (Read 670 times)
Export problems
Nov 27th, 2005, 3:36am
 
Hi there..
I have made a little drawing app in processing which saves the images drawn on my webpage.
The good part is that it actually works, I can draw images and save them to my webpage thru php using a post script made by Selas and Toxi (i think it was) i found here in the forum.
The bad part is that it only works in "run mode" in processing, when i export the sketch and test it in a browser, it won't show anything.

I'm pretty new to this, so it could be some very basic stuff i need to do/change.

Anyway the non working script + code is here:
http://komputerwolf.com/include/wolfsketchpad_v2/applet/

Any suggestions or answers to the problem will be much appreciated.
Re: Export problems
Reply #1 - Nov 28th, 2005, 12:32am
 
If you look in the taskbar(assuming you're using windows), when you have an applet open in a browser, there should be a java icon. If you right click on this, and select "Open Console" you'll get a window, which will contain any error emssages generated by the applet.

In your cas, the applet generates:
Code:
Error while running applet.
java.lang.RuntimeException: background image must be the same size as your application

at processing.core.PGraphics2.background(PGraphics2.java:903)

at processing.core.PApplet.background(PApplet.java:6868)

at wolfsketchpad_v2.setup(wolfsketchpad_v2.java:26)

at processing.core.PApplet.display(PApplet.java:1144)

at processing.core.PGraphics.requestDisplay(PGraphics.java:520)

at processing.core.PApplet.run(PApplet.java:1028)

at java.lang.Thread.run(Unknown Source)


I'm not 100% sure what's causing the problem, since the image appears to be the correct size. Possibly you need to move the background() call to within draw(), or possibly load the image into a PImage before using it in background().
Re: Export problems
Reply #2 - Nov 28th, 2005, 5:48am
 
see also the FAQ for this topic:
http://processing.org/faq/bugs.html#applet

the image may not be loading properly or you might not be using size() as the first thing inside setup() (and before you call background). but it's impossible to know without code.
Page Index Toggle Pages: 1