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 & HelpIntegration › saveFrame in Eclipse Mac
Page Index Toggle Pages: 1
saveFrame in Eclipse Mac (Read 940 times)
saveFrame in Eclipse Mac
Jul 11th, 2008, 10:48am
 
Hi guys, on Windows, if I remember well, when I run my applet in eclipse I'm able to save frames, on mac instead I get "Can't use saveFrame() when running in a browser.". I'm using as viewer sun.applet.AppletViewer. If I export the applet with fatJar and then run it I can save correctly.

Any idea how to save images also before exporting it?

Cheers, chr
Re: saveFrame in Eclipse Mac
Reply #1 - Jul 11th, 2008, 1:36pm
 
I believe you must sign your applet to make it save files.
Re: saveFrame in Eclipse Mac
Reply #2 - Jul 11th, 2008, 3:08pm
 
Isn't the signing something related to the deployment instead of testing?
Re: saveFrame in Eclipse Mac
Reply #3 - Jul 11th, 2008, 5:07pm
 
If you test your applet in a browser, it is already deployed (from the point of view of the browser), even if it is in your local server.
Re: saveFrame in Eclipse Mac
Reply #4 - Jul 11th, 2008, 5:12pm
 
I'm testing my applet in Eclipse.

Cheers, chr
Re: saveFrame in Eclipse Mac
Reply #5 - Jul 12th, 2008, 6:22pm
 
Well, your message states: "running in a browser".
I think Eclipse is simulating the browser environment, or even just using a browser component to test it.

I can be wrong, though, I have little experience with applets... Tongue
Re: saveFrame in Eclipse Mac
Reply #6 - Jul 12th, 2008, 8:22pm
 
Just add a "main" function and then run the PApplet as an "application" rather than an "applet."

Code:

static public void main(String args[]) {
PApplet.main(new String[] {"packagepath.YourClassName"});
}
Re: saveFrame in Eclipse Mac
Reply #7 - Jul 13th, 2008, 9:57am
 
Ops, of course I had the main, but I was testing it as applet. As application works fine! Smiley

Thanks Daniel, chr
Page Index Toggle Pages: 1