diff --git a/MapView.pde b/MapView.pde index 0db6083..0e29509 100644 --- a/MapView.pde +++ b/MapView.pde @@ -1,4 +1,4 @@ -import processing.opengl.*; +//import processing.opengl.*; import com.modestmaps.*; import com.modestmaps.core.*; import com.modestmaps.geo.*; diff --git a/Sighting.pde b/Sighting.pde index a1ae236..aaa22e8 100644 --- a/Sighting.pde +++ b/Sighting.pde @@ -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()); + } } } diff --git a/Utils.pde b/Utils.pde index eeb9610..41cd79f 100644 --- a/Utils.pde +++ b/Utils.pde @@ -60,6 +60,7 @@ void popClip() dataPath(""): /Users/camillo/UIC/CS424 visualization/p3/cs424p3/application.macosx/data/ applet: sketchPath: null + dataPath(""): null */ /* data utilities */