Bug 1125 : Exported applet does not update
Last modified: 2009-01-17 11:04




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
bpchesney
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2009-01-17 08:22
When I try to export to an applet, it works fine; but when I edit the code, save it and export
again, the applet does not update. I have run the code in the PDE to make sure it's what I
want and that it has been updated, but when I export again, the applet doesn't get updated.

I've tried deleting the applet directory in between exports, but this doesn't help (processing I
think does this for you anyway). The time stamps on the files all look correct in that it looks
like the files in the new applet directory are not just stale.

I've tried shutting down processing, restarting, and exporting again, to no avail. I've also
tried shutting down my browser that I'm using to run the applet, no luck. The only thing that
works is if I completely shut down my computer, power back up again, and then open up
processing and export again -- then the applet changes.

I'm new to processing and don't have much Java experience, so it's highly likely that I'm
doing something wrong, but I can't figure out what. Is there something running in the
background when I start processing? Are there intermediate files in the export process that
aren't being deleted? I wouldn't know where to begin looking for them -- can somebody help
me please?

A few notes about my setup: Macbook, OSX, Processing version 1.0.1, web browser is Safari
3.2.1 (I've tried it in Firefox 3 -- same thing), Java 1.5. I don't know what else to look for
that would be helpful. Below is some example code for the applet, but I've tried it with a
few different projects and the code doesn't seem to matter. Any help that anyone could
provide would be greatly appreciated.


void setup() {
size(200,200);
PFont font;
// The font must be located in the sketch's
// "data" directory to load successfully
font = loadFont("Serif-32.vlw");
textFont(font);
}

void draw() {
fill(0, 102, 153);
text("hello world!", 20, 50);
}
Additional Comment #1 From fry 2009-01-17 09:28
The problem is that the browser is caching the old version of the applet.
At a minimum, you'll usually need to quit out of the browser (on Mac OS) or
close all browser and explorer windows (on Windows), to make things refresh
properly. Holding down shift, alt, or option when reloading the web page
may also help, but it's not certain to work.

The workaround I usually use it to test using appletviewer (since it's
easier to restart than a browser), so that I know that things work as an
applet. Then I try loading with the browser to make sure.
Additional Comment #2 From bpchesney 2009-01-17 10:32
Thanks, appletviewer does the trick -- I'd never used it before.

FYI, even if I quit the browser, I still get the old version of the applet. Maybe quitting the
browser doesn't necessarily force a refresh of the applet on exit...


thanks,
brian
Additional Comment #3 From fry 2009-01-17 11:04
Yeah, you'll have to file a bug with whoever made the browser in that case.
You're outside the Processing environment so we don't have any control over
that.