mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 09:39:19 +01:00
die() throws ex, kUserDomain for find docs folder on osx
This commit is contained in:
@@ -323,11 +323,19 @@ public class PdeBase {
|
||||
// not clear if i can write to this folder tho..
|
||||
try {
|
||||
MRJOSType domainDocuments = new MRJOSType("docs");
|
||||
File libraryFolder = MRJFileUtils.findFolder(domainDocuments);
|
||||
//MRJFileUtils.findFolder(kUserDomain, domainDocuments);
|
||||
sketchbookFolder = new File(libraryFolder, "Processing");
|
||||
//File libraryFolder = MRJFileUtils.findFolder(domainDocuments);
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
// for 77, try switching this to the user domain, just to be sure
|
||||
Method findFolderMethod =
|
||||
MRJFileUtils.class.getMethod("findFolder",
|
||||
new Class[] { Short.TYPE,
|
||||
MRJOSType.class });
|
||||
File documentsFolder = (File)
|
||||
findFolderMethod.invoke(null, new Object[] { new Short(kUserDomain),
|
||||
domainDocuments });
|
||||
sketchbookFolder = new File(documentsFolder, "Processing");
|
||||
|
||||
} catch (Exception e) {
|
||||
showError("sketch folder problem",
|
||||
"Could not locate default sketch folder location.", e);
|
||||
}
|
||||
|
||||
@@ -1266,6 +1266,8 @@ public class PApplet extends Applet
|
||||
public void die(String what) {
|
||||
stop();
|
||||
|
||||
throw new RuntimeException("died: " + what);
|
||||
/*
|
||||
if (online) {
|
||||
System.err.println("i'm dead.. " + what);
|
||||
|
||||
@@ -1273,6 +1275,7 @@ public class PApplet extends Applet
|
||||
System.err.println(what);
|
||||
System.exit(1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ X may need a 'wedge' function to draw a stroke around the whole thing
|
||||
X only allocate stencil and zbuffer on first call to depth()
|
||||
X this will require changes to PTriangle and PLine inside their loops
|
||||
X try running javadoc
|
||||
X die() may need to throw a RuntimeException
|
||||
|
||||
covered in previous
|
||||
X before graphics engine change, attach jogl stuff
|
||||
@@ -107,15 +108,7 @@ X make light() functions actually do something in PGraphicsGL
|
||||
X box() and sphere() working again
|
||||
X make opengl work in draw mode
|
||||
X set initial size using --size=
|
||||
|
||||
api todos
|
||||
_ sphere x,y,z,r or box w,h,d.. need to make them consistent
|
||||
_ look at curve functions more closely
|
||||
_ should we switch to curveVertex(1,2,3) (ala curveto)
|
||||
_ because some confusion with mixing types of curves
|
||||
_ how to force PGraphics() instead of PGraphics2()
|
||||
|
||||
_ color channels seem to be swapped on windows in displaying image example
|
||||
X color channels seem to be swapped on windows in image example
|
||||
X check on the mac to see what it looks like
|
||||
|
||||
_ get text working again
|
||||
@@ -131,10 +124,16 @@ _ default to single byte input from serial port
|
||||
_ and add serial.setBuffer() for message length as alternative
|
||||
_ or serial.setDelimiter() to fire message on delim
|
||||
|
||||
_ die() may need to throw a RuntimeException
|
||||
|
||||
//
|
||||
|
||||
api todos
|
||||
_ sphere x,y,z,r or box w,h,d.. need to make them consistent
|
||||
_ look at curve functions more closely
|
||||
_ should we switch to curveVertex(1,2,3) (ala curveto)
|
||||
_ because some confusion with mixing types of curves
|
||||
_ how to force PGraphics() instead of PGraphics2()
|
||||
|
||||
_ also have a simple way to hook in triangle leeches to PGraphics3
|
||||
|
||||
_ implement PGraphics2.curveVertex()
|
||||
|
||||
@@ -12,7 +12,10 @@ X (same as applet exporter function)
|
||||
o when using core graphics, don't show applet frame until first frame
|
||||
o (in opengl, open frame early, make sure this isn't inhibited)
|
||||
X probably can't do this, since don't know at runtime if it's gl
|
||||
X RuntimeException
|
||||
X RuntimeException errors are a little prettier
|
||||
X updated windows icon
|
||||
X make macosx use kUserDomain to grab Documents folder
|
||||
X this is just-in-case, who knows what they're up to over in cupertino
|
||||
|
||||
create a new sketch
|
||||
create a new tab named "a"
|
||||
|
||||
Reference in New Issue
Block a user