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 › applet loading different data file for dif browser
Page Index Toggle Pages: 1
applet loading different data file for dif browser (Read 534 times)
applet loading different data file for dif browser
May 6th, 2009, 9:36am
 
I'm trying to visualize a fairly large amount of data from a MySQL database. I'm using an html form to query the data, and then a php file to perform searching operations and write the data to a file, and then redirect to the index.html file generated by exporting the sketch.

  • Opening index.html in Firefox ends up pulling the right data file.
  • Opening index.html in Safari ends up pulling the data file that was used during testing.
  • Opening index.html through a test apache server pulls the data file that was used during testing for both browsers.


I'm loading the file by loadStrings("data.txt") in setup. data.txt is in the applet folder, but an identical file is written to the data folder. It seems to only matter to edit the file in the applet folder when Firefox is pulling the right data file.

Re: applet loading different data file for dif browser
Reply #1 - May 7th, 2009, 8:14am
 
Upon investigating further, I'm fairly certain that this problem is due to signing the applet, although I'm still confused as to why Safari and Mozilla showed different datafiles... it must be related to security settings.

My method of doing this is not very good. Instead of using php to write a new datafile for processing to open, I'm just calling the php files from inside my sketch. Luckily my database isn't too large for this to appear to be a problem yet.
Re: applet loading different data file for dif browser
Reply #2 - May 9th, 2009, 1:29am
 
I once read in the forum that you can remove the data files from your sketch before exporting to be sure you can put them back in a directory when running the applet (and be sure they are not present in the default applet .jar packed file).
Maybe this can help you ?
Page Index Toggle Pages: 1