Permalink
Browse files

trying to make the applet work

  • Loading branch information...
1 parent 0effe4a commit 03390a3aad3464e12bbc2062156ee8815ec17530 @camillol committed Nov 1, 2011
Showing with 17 additions and 10 deletions.
  1. +1 −1 MapView.pde
  2. +15 −9 Sighting.pde
  3. +1 −0 Utils.pde
View
@@ -1,4 +1,4 @@
-import processing.opengl.*;
+//import processing.opengl.*;
import com.modestmaps.*;
import com.modestmaps.core.*;
import com.modestmaps.geo.*;
View
@@ -338,16 +338,22 @@ class SQLiteDataSource implements DataSource {
String dbname = "ufo.db";
String dbpath = null;
- dbpath = dataPath(dbname);
- File dbf = new File(dbpath);
- if (!dbf.exists()) {
- dbpath = savePath(dbname);
- dbf = new File(dbpath);
+ if (sketchPath == null) {
+ /* applet - what now!? */
+ println("applets can't access files!");
+ dbpath = "/Users/camillo/test.py";
+ } else {
+ dbpath = dataPath(dbname);
+ File dbf = new File(dbpath);
if (!dbf.exists()) {
- stopWatch();
- print("extracting database...");
- saveStream(dbpath, createInput(dbname));
- println(stopWatch());
+ dbpath = savePath(dbname);
+ dbf = new File(dbpath);
+ if (!dbf.exists()) {
+ stopWatch();
+ print("extracting database...");
+ saveStream(dbpath, createInput(dbname));
+ println(stopWatch());
+ }
}
}
View
@@ -60,6 +60,7 @@ void popClip()
dataPath(""): /Users/camillo/UIC/CS424 visualization/p3/cs424p3/application.macosx/data/
applet: sketchPath: null
+ dataPath(""): null
*/
/* data utilities */

0 comments on commit 03390a3

Please sign in to comment.