Skip to content

Commit

Permalink
trying to make the applet work
Browse files Browse the repository at this point in the history
  • Loading branch information
camillol committed Nov 1, 2011
1 parent 0effe4a commit 03390a3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MapView.pde
@@ -1,4 +1,4 @@
import processing.opengl.*; //import processing.opengl.*;
import com.modestmaps.*; import com.modestmaps.*;
import com.modestmaps.core.*; import com.modestmaps.core.*;
import com.modestmaps.geo.*; import com.modestmaps.geo.*;
Expand Down
24 changes: 15 additions & 9 deletions Sighting.pde
Expand Up @@ -338,16 +338,22 @@ class SQLiteDataSource implements DataSource {
String dbname = "ufo.db"; String dbname = "ufo.db";
String dbpath = null; String dbpath = null;


dbpath = dataPath(dbname); if (sketchPath == null) {
File dbf = new File(dbpath); /* applet - what now!? */
if (!dbf.exists()) { println("applets can't access files!");
dbpath = savePath(dbname); dbpath = "/Users/camillo/test.py";
dbf = new File(dbpath); } else {
dbpath = dataPath(dbname);
File dbf = new File(dbpath);
if (!dbf.exists()) { if (!dbf.exists()) {
stopWatch(); dbpath = savePath(dbname);
print("extracting database..."); dbf = new File(dbpath);
saveStream(dbpath, createInput(dbname)); if (!dbf.exists()) {
println(stopWatch()); stopWatch();
print("extracting database...");
saveStream(dbpath, createInput(dbname));
println(stopWatch());
}
} }
} }


Expand Down
1 change: 1 addition & 0 deletions Utils.pde
Expand Up @@ -60,6 +60,7 @@ void popClip()
dataPath(""): /Users/camillo/UIC/CS424 visualization/p3/cs424p3/application.macosx/data/ dataPath(""): /Users/camillo/UIC/CS424 visualization/p3/cs424p3/application.macosx/data/
applet: sketchPath: null applet: sketchPath: null
dataPath(""): null
*/ */


/* data utilities */ /* data utilities */
Expand Down

0 comments on commit 03390a3

Please sign in to comment.