mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
moved reference code into PdeBase, tidying readme, cleanup console
This commit is contained in:
107
app/PdeBase.java
107
app/PdeBase.java
@@ -39,6 +39,8 @@ import javax.swing.undo.*;
|
||||
|
||||
public class PdeBase extends Frame implements ActionListener {
|
||||
static Properties properties;
|
||||
static Properties keywords; // keyword -> reference html lookup
|
||||
|
||||
static Frame frame; // now 'this'
|
||||
static String encoding;
|
||||
static Image icon;
|
||||
@@ -175,7 +177,7 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
try {
|
||||
icon = Toolkit.getDefaultToolkit().getImage("lib/icon.gif");
|
||||
frame.setIconImage(icon);
|
||||
} catch (Exception e) { } // fail silently
|
||||
} catch (Exception e) { } // fail silently, no big whup
|
||||
|
||||
windowListener = new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
@@ -213,40 +215,33 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
}
|
||||
//properties.list(System.out);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error reading pde.properties");
|
||||
e.printStackTrace();
|
||||
//System.exit(1);
|
||||
}
|
||||
// int width = getInteger("window.width", 600);
|
||||
// int height = getInteger("window.height", 350);
|
||||
|
||||
/*
|
||||
encoding = get("encoding");
|
||||
boolean beautify = false;
|
||||
boolean convertSemicolons = false;
|
||||
String program = get("program");
|
||||
if (program != null) {
|
||||
//program = getFile(program);
|
||||
} else {
|
||||
program = get("inline_program");
|
||||
convertSemicolons = true;
|
||||
}
|
||||
if (program != null) {
|
||||
// don't beautify if it's java code
|
||||
if (program.indexOf("extends PdePlayer") == -1) {
|
||||
// don't convert ; to \n if scheme
|
||||
if (program.charAt(0) != ';') {
|
||||
if (convertSemicolons) {
|
||||
program = program.replace(';', '\n');
|
||||
}
|
||||
// not scheme, but don't beautify if it's python
|
||||
if (program.charAt(0) != '#')
|
||||
beautify = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// read in the keywords for the reference
|
||||
|
||||
final String KEYWORDS = "pde_keywords.properties";
|
||||
keywords = new Properties();
|
||||
try {
|
||||
// this probably won't work on macos9
|
||||
// seems to work on macosx java 1.4, though i don't think
|
||||
// it worked on java 1.3 for macosx (see implementation above)
|
||||
keywords.load(getClass().getResource(KEYWORDS).openStream());
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error loading keywords, " +
|
||||
"reference lookup will be unavailable");
|
||||
System.err.println(e.toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
// build the editor object
|
||||
|
||||
editor = new PdeEditor(this);
|
||||
frame.setLayout(new BorderLayout());
|
||||
@@ -259,17 +254,12 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
menu = new Menu("File");
|
||||
menu.add(new MenuItem("New", new MenuShortcut('N')));
|
||||
sketchbookMenu = new Menu("Open");
|
||||
//rebuildSketchbookMenu(openMenu);
|
||||
menu.add(sketchbookMenu);
|
||||
saveMenuItem = new MenuItem("Save", new MenuShortcut('S'));
|
||||
saveAsMenuItem = new MenuItem("Save as...", new MenuShortcut('S', true));
|
||||
menu.add(saveMenuItem);
|
||||
menu.add(saveAsMenuItem);
|
||||
menu.add(new MenuItem("Rename..."));
|
||||
//menu.add(new MenuItem("Save", new MenuShortcut('S')));
|
||||
//menu.add(new MenuItem("Save as...", new MenuShortcut('S', true)));
|
||||
//menu.add(new MenuItem("Rename", new MenuShortcut('S', true)));
|
||||
//menu.add(new MenuItem("Duplicate", new MenuShortcut('D')));
|
||||
menu.add(new MenuItem("Export to Web", new MenuShortcut('E')));
|
||||
item = new MenuItem("Export Application", new MenuShortcut('E', true));
|
||||
item.setEnabled(false);
|
||||
@@ -331,6 +321,20 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
});
|
||||
menu.add(item);
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
item = new MenuItem("Find in Reference");
|
||||
item.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (editor.textarea.isSelectionActive()) {
|
||||
String text = editor.textarea.getSelectedText();
|
||||
String referenceFile = (String) keywords.get(text);
|
||||
showReference(referenceFile);
|
||||
}
|
||||
}
|
||||
});
|
||||
menu.add(item);
|
||||
|
||||
menubar.add(menu);
|
||||
|
||||
Document document = editor.textarea.getDocument();
|
||||
@@ -338,7 +342,7 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
|
||||
menu = new Menu("Sketch");
|
||||
menu.add(new MenuItem("Run", new MenuShortcut('R')));
|
||||
menu.add(new MenuItem("Present", new MenuShortcut('P')));
|
||||
menu.add(new MenuItem("Present", new MenuShortcut('R', true)));
|
||||
menu.add(new MenuItem("Stop", new MenuShortcut('T')));
|
||||
menu.addSeparator();
|
||||
|
||||
@@ -809,26 +813,31 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (serialMenu.getItemCount() == 0) {
|
||||
//System.out.println("dimming serial menu");
|
||||
serialMenu.setEnabled(false);
|
||||
}
|
||||
|
||||
// macosx fails on its own when trying to load the library
|
||||
// so need to explicitly try here.. not sure if this is the
|
||||
// correct lib, but it's at least one that's loaded inside
|
||||
// the javacomm solaris stuff, which is the .jar that's included
|
||||
// with the osx release (and rxtx takes over)
|
||||
if (platform == MACOSX) {
|
||||
try {
|
||||
System.loadLibrary("SolarisSerialParallel");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
//e.printStackTrace();
|
||||
problem = true;
|
||||
}
|
||||
try {
|
||||
System.loadLibrary("SolarisSerialParallel");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
//e.printStackTrace();
|
||||
problem = true;
|
||||
}
|
||||
}
|
||||
|
||||
// only warn them if this is the first time
|
||||
if (problem && firstTime) {
|
||||
JOptionPane.showMessageDialog(frame,
|
||||
"Serial port support not installed.\n" +
|
||||
"Check the readme for instructions if you " +
|
||||
"need to use the serial port. ",
|
||||
"Check the readme for instructions\n" +
|
||||
"if you need to use the serial port. ",
|
||||
"Serial Port Warning",
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
}
|
||||
@@ -906,6 +915,14 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
}
|
||||
|
||||
|
||||
static public void showReference(String referenceFile) {
|
||||
String currentDir = System.getProperty("user.dir");
|
||||
openURL(currentDir + File.separator +
|
||||
"reference" + File.separator +
|
||||
referenceFile + ".html");
|
||||
}
|
||||
|
||||
|
||||
static public void openURL(String url) {
|
||||
try {
|
||||
if (platform == WINDOWS) {
|
||||
@@ -915,7 +932,7 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
// include me) it'd be annoying to be dropped into ie.
|
||||
//Runtime.getRuntime().exec("c:\\progra~1\\intern~1\\iexplore "+ currentDir
|
||||
|
||||
// this uses a shell execute to launch the .html file
|
||||
// the following uses a shell execute to launch the .html file
|
||||
// note that under cygwin, the .html files have to be chmodded +x
|
||||
// after they're unpacked from the zip file. i don't know why,
|
||||
// and don't understand what this does in terms of windows
|
||||
@@ -929,7 +946,7 @@ public class PdeBase extends Frame implements ActionListener {
|
||||
} else if (platform == MACOSX) {
|
||||
//com.apple.eio.FileManager.openURL(url);
|
||||
if (!url.startsWith("http://")) url = "file://" + url;
|
||||
System.out.println("trying to open " + url);
|
||||
//System.out.println("trying to open " + url);
|
||||
com.apple.mrj.MRJFileUtils.openURL(url);
|
||||
|
||||
} else if (platform == MACOS9) {
|
||||
|
||||
@@ -414,7 +414,7 @@ public class PdeEditor extends JPanel {
|
||||
if(serialPort != null) {
|
||||
PdeBase.properties.put("serial.port", serialPort);
|
||||
}
|
||||
|
||||
|
||||
boolean ee = new Boolean(skprops.getProperty("editor.external", "false")).booleanValue();
|
||||
setExternalEditor(ee);
|
||||
|
||||
@@ -1504,32 +1504,16 @@ afterwards, some of these steps need a cleanup function
|
||||
ps.println("</body>");
|
||||
ps.println("</html>");
|
||||
|
||||
/*
|
||||
ps.println("<HTML> <BODY BGCOLOR=\"white\">");
|
||||
ps.println();
|
||||
ps.println("<BR> <BR> <BR> <CENTER>");
|
||||
|
||||
ps.println();
|
||||
ps.print("<APPLET CODE=\"" + exportSketchName + "\" ARCHIVE=\"");
|
||||
ps.print(exportSketchName + ".jar");
|
||||
ps.println("\" WIDTH=" + wide + " HEIGHT=" + high + ">");
|
||||
ps.println("</APPLET>");
|
||||
ps.println();
|
||||
|
||||
ps.println("<A HREF=\"" + exportSketchName + ".java\">source code</A>");
|
||||
ps.println();
|
||||
|
||||
ps.println("</CENTER>");
|
||||
|
||||
ps.println("</BODY> </HTML>");
|
||||
*/
|
||||
|
||||
ps.flush();
|
||||
ps.close();
|
||||
|
||||
#ifdef MACOS
|
||||
// this chunk left disabled, because safari doesn't actually
|
||||
// set the type/creator of html files it makes
|
||||
|
||||
// however, for macos9, this should be re-enabled
|
||||
// (but it's not here since macos9 isn't supported for beta)
|
||||
|
||||
/*
|
||||
// thank you apple, for changing this
|
||||
//com.apple.eio.setFileTypeAndCreator(String filename, int, int);
|
||||
@@ -1774,11 +1758,6 @@ afterwards, some of these steps need a cleanup function
|
||||
String prog = textarea.getText();
|
||||
makeHistory(prog, BEAUTIFY);
|
||||
|
||||
//if ((prog.charAt(0) == '#') || (prog.charAt(0) == ';')) {
|
||||
//message("Only DBN code can be made beautiful.");
|
||||
//buttons.clear();
|
||||
//return;
|
||||
//}
|
||||
char program[] = prog.toCharArray();
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
boolean gotBlankLine = false;
|
||||
|
||||
@@ -38,22 +38,14 @@ import javax.swing.text.*;
|
||||
public class PdeEditorConsole extends JScrollPane {
|
||||
PdeEditor editor;
|
||||
|
||||
JTextPane consoleTextPane;
|
||||
StyledDocument consoleDoc;
|
||||
|
||||
MutableAttributeSet stdStyle;
|
||||
MutableAttributeSet errStyle;
|
||||
|
||||
/* for potential cross platform whitespace munging
|
||||
static final byte CR = (byte)'\r';
|
||||
static final byte LF = (byte)'\n';
|
||||
static final byte TAB = (byte)'\t';
|
||||
static final int TAB_SIZE = 2;
|
||||
*/
|
||||
|
||||
boolean cerror;
|
||||
|
||||
//static final int HINSET = 6;
|
||||
//static final int VINSET = 6;
|
||||
|
||||
static PrintStream systemOut;
|
||||
static PrintStream systemErr;
|
||||
|
||||
@@ -67,7 +59,7 @@ public class PdeEditorConsole extends JScrollPane {
|
||||
public PdeEditorConsole(PdeEditor editor) {
|
||||
this.editor = editor;
|
||||
|
||||
JTextPane consoleTextPane = new JTextPane();
|
||||
consoleTextPane = new JTextPane();
|
||||
consoleTextPane.setEditable(false);
|
||||
consoleDoc = consoleTextPane.getStyledDocument();
|
||||
|
||||
@@ -75,16 +67,16 @@ public class PdeEditorConsole extends JScrollPane {
|
||||
MutableAttributeSet standard = new SimpleAttributeSet();
|
||||
StyleConstants.setAlignment(standard, StyleConstants.ALIGN_LEFT);
|
||||
consoleDoc.setParagraphAttributes(0, 0, standard, true);
|
||||
|
||||
|
||||
// build styles for different types of console output
|
||||
Color bgColor = PdeBase.getColor("editor.console.bgcolor",
|
||||
new Color(26, 26, 26));
|
||||
new Color(26, 26, 26));
|
||||
Color fgColorOut = PdeBase.getColor("editor.console.fgcolor.output",
|
||||
new Color(153, 153, 153));
|
||||
new Color(153, 153, 153));
|
||||
Color fgColorErr = PdeBase.getColor("editor.console.fgcolor.error",
|
||||
new Color(204, 51, 0));
|
||||
new Color(204, 51, 0));
|
||||
Font font = PdeBase.getFont("editor.console.font",
|
||||
new Font("Monospaced", Font.PLAIN, 11));
|
||||
new Font("Monospaced", Font.PLAIN, 11));
|
||||
|
||||
stdStyle = new SimpleAttributeSet();
|
||||
StyleConstants.setForeground(stdStyle, fgColorOut);
|
||||
@@ -93,7 +85,7 @@ public class PdeEditorConsole extends JScrollPane {
|
||||
StyleConstants.setFontFamily(stdStyle, font.getFamily());
|
||||
StyleConstants.setBold(stdStyle, font.isBold());
|
||||
StyleConstants.setItalic(stdStyle, font.isItalic());
|
||||
|
||||
|
||||
errStyle = new SimpleAttributeSet();
|
||||
StyleConstants.setForeground(errStyle, fgColorErr);
|
||||
StyleConstants.setBackground(errStyle, bgColor);
|
||||
@@ -103,23 +95,25 @@ public class PdeEditorConsole extends JScrollPane {
|
||||
StyleConstants.setItalic(errStyle, font.isItalic());
|
||||
|
||||
consoleTextPane.setBackground(bgColor);
|
||||
|
||||
|
||||
// add the jtextpane to this scrollpane
|
||||
this.setViewportView(consoleTextPane);
|
||||
|
||||
// calculate height of a line of text in pixels and size window accordingly
|
||||
// calculate height of a line of text in pixels
|
||||
// and size window accordingly
|
||||
FontMetrics metrics = this.getFontMetrics(font);
|
||||
int height = metrics.getAscent() + metrics.getDescent();
|
||||
int lines = PdeBase.getInteger("editor.console.lines", 6);
|
||||
int sizeFudge = 10; // unclear why this is necessary, but it is
|
||||
Dimension prefDimension = new Dimension(1024, (height * lines) + sizeFudge);
|
||||
Dimension prefDimension =
|
||||
new Dimension(1024, (height * lines) + sizeFudge);
|
||||
setPreferredSize(prefDimension);
|
||||
|
||||
if (systemOut == null) {
|
||||
systemOut = System.out;
|
||||
systemErr = System.err;
|
||||
|
||||
// no text thing on macos
|
||||
// macos9/macosx do this by default, disable for those platforms
|
||||
boolean tod = ((PdeBase.platform != PdeBase.MACOSX) &&
|
||||
(PdeBase.platform != PdeBase.MACOS9));
|
||||
|
||||
@@ -157,27 +151,25 @@ public class PdeEditorConsole extends JScrollPane {
|
||||
|
||||
|
||||
public void write(byte b[], int offset, int length, boolean err) {
|
||||
if (err != cerror) {
|
||||
// advance the line because switching between err/out streams
|
||||
// potentially, could check whether we're already on a new line
|
||||
message("", cerror, true);
|
||||
}
|
||||
|
||||
// synchronized (cerror) { // has to be an object...
|
||||
if (err != cerror) {
|
||||
// advance the line because switching between err/out streams
|
||||
// potentially, could check whether we're already on a new line
|
||||
message("", cerror, true);
|
||||
}
|
||||
// we could do some cross platform CR/LF mangling here before outputting
|
||||
|
||||
// we could do some cross platform CR/LF mangling here before outputting
|
||||
|
||||
// add text to output document
|
||||
message(new String(b, offset, length), err, false);
|
||||
// set last error state
|
||||
cerror = err;
|
||||
// }
|
||||
// add text to output document
|
||||
message(new String(b, offset, length), err, false);
|
||||
// set last error state
|
||||
cerror = err;
|
||||
}
|
||||
|
||||
|
||||
public void message(String what, boolean err, boolean advance) {
|
||||
// under osx, suppress the spew about the serial port
|
||||
// to avoid an error every time someone loads their app
|
||||
// (the error is dealt with in PdeBase with a message dialog)
|
||||
if (PdeBase.platform == PdeBase.MACOSX) {
|
||||
if (what.equals("Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path")) return;
|
||||
if (what.equals("Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver")) return;
|
||||
@@ -185,7 +177,7 @@ public class PdeEditorConsole extends JScrollPane {
|
||||
|
||||
// to console display
|
||||
appendText(what, err);
|
||||
|
||||
|
||||
if (err) {
|
||||
systemErr.print(what);
|
||||
} else {
|
||||
@@ -202,32 +194,20 @@ public class PdeEditorConsole extends JScrollPane {
|
||||
}
|
||||
}
|
||||
|
||||
private void appendText(String text, boolean err)
|
||||
{
|
||||
|
||||
private void appendText(String text, boolean err) {
|
||||
try {
|
||||
consoleDoc.insertString(consoleDoc.getLength(), text, err ? errStyle : stdStyle);
|
||||
}
|
||||
catch(Exception e) {}
|
||||
}
|
||||
consoleDoc.insertString(consoleDoc.getLength(), text,
|
||||
err ? errStyle : stdStyle);
|
||||
|
||||
/*
|
||||
// no longer needed because setPreferredSize is used
|
||||
// always move to the end of the text as it's added
|
||||
consoleTextPane.setCaretPosition(consoleDoc.getLength());
|
||||
|
||||
public Dimension getPreferredSize() {
|
||||
return getMinimumSize();
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
public Dimension getMinimumSize() {
|
||||
return new Dimension(600, PdeEditor.GRID_SIZE * 3);
|
||||
}
|
||||
|
||||
public Dimension getMaximumSize() {
|
||||
return new Dimension(3000, PdeEditor.GRID_SIZE * 3);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
class PdeEditorConsoleStream extends OutputStream {
|
||||
PdeEditorConsole parent;
|
||||
boolean err; // whether stderr or stdout
|
||||
@@ -269,29 +249,6 @@ class PdeEditorConsoleStream extends OutputStream {
|
||||
echo = null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
//System.out.println("leech2:");
|
||||
if (length >= 1) {
|
||||
int lastchar = b[offset + length - 1];
|
||||
if (lastchar == '\r') {
|
||||
length--;
|
||||
} else if (lastchar == '\n') {
|
||||
if (length >= 2) {
|
||||
int secondtolastchar = b[offset + length - 2];
|
||||
if (secondtolastchar == '\r') {
|
||||
length -= 2;
|
||||
} else {
|
||||
length--;
|
||||
}
|
||||
} else {
|
||||
length--;
|
||||
}
|
||||
}
|
||||
//if ((lastchar = '\r') || (lastchar == '\n')) length--;
|
||||
}
|
||||
//if (b[offset + length - 1] == '\r'
|
||||
parent.message("2: " + length + " " + new String(b, offset, length), err);
|
||||
*/
|
||||
}
|
||||
|
||||
public void write(int b) {
|
||||
@@ -306,6 +263,5 @@ class PdeEditorConsoleStream extends OutputStream {
|
||||
echo = null;
|
||||
}
|
||||
}
|
||||
//parent.message(String.valueOf((char)b), err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
# a pound sign at the beginning of a line is a comment
|
||||
# parameters need to be un-commented before they take effect
|
||||
# usually, the default is listed here, just commented out
|
||||
|
||||
# font size for editor
|
||||
#editor.program.font=Monospaced,plain,12
|
||||
@@ -37,7 +38,8 @@ editor.program.literal1.style=#cc0000,plain
|
||||
# p5 built in variables: mouseX, width, pixels
|
||||
editor.program.literal2.style=#cc0000,plain
|
||||
|
||||
# ??
|
||||
# ?? maybe this is for words followed by a colon
|
||||
# like in case statements or goto
|
||||
editor.program.label.style=#7E7E00,bold
|
||||
|
||||
# + - = /
|
||||
@@ -99,9 +101,14 @@ editor.status.font = SansSerif,plain,12
|
||||
# how many lines to scroll for each tick on the wheel mouse
|
||||
#editor.wheelmouse.multiplier=3
|
||||
|
||||
# background for full-screen presentation mode
|
||||
|
||||
# background color for full-screen presentation mode
|
||||
#run.present.bgcolor=#666666
|
||||
|
||||
|
||||
# these are the defaults for the serial port
|
||||
# un-comment them and set them to different values if you'd
|
||||
# rather have something else as the default
|
||||
#serial.port = COM1
|
||||
#serial.rate = 9600
|
||||
#serial.parity = N
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# p r o c e s s i n g keyword reference mapping
|
||||
# p r o c e s s i n g keyword reference mapping
|
||||
#
|
||||
# format:
|
||||
# token=filename
|
||||
@@ -9,7 +9,6 @@
|
||||
# "reference" directory
|
||||
#
|
||||
# note that some characters, such as "=", have to be escaped by "\"
|
||||
#
|
||||
|
||||
else=else
|
||||
for=for_
|
||||
|
||||
@@ -188,8 +188,8 @@ our priority for how well the beast runs looks like:
|
||||
5. linux
|
||||
|
||||
windows is the superior platform for running java applications. it's
|
||||
not because we like windows the best, so sorry to the zealots in all
|
||||
other corners of the machine space, but that's just how it is. the vm
|
||||
not because we like windows the best, (sorry to the zealots in all
|
||||
other corners of the machine space) but that's just how it is. the vm
|
||||
for mac os x is really quite good (especially when compared to apple's
|
||||
previous efforts), but it's still a bit behind. we think os x will be
|
||||
a great bet for the future, and apple is putting all their feeble
|
||||
@@ -199,7 +199,8 @@ developing the version for mac os 9 is a big headache, but we think
|
||||
lots of people still use the crusty operating system, so we're going
|
||||
to keep supporting it for the meantime. the guess is that a lot of
|
||||
schools are still using it in their labs, and since schools are a
|
||||
significant target for the environment, we gotta play along.
|
||||
significant target for the environment, we gotta play along. in the
|
||||
short term, however, development for mac os 9 has been suspended.
|
||||
|
||||
windows 95/98/ME is a piece of crap, but since lots of people (are
|
||||
often forced to) use it, we'll try and support. early alpha versions
|
||||
@@ -220,11 +221,7 @@ you tell us about them, so we can fix them.
|
||||
|
||||
MAC OS X
|
||||
|
||||
note that this release does *NOT* work under java 1.4. the most recent
|
||||
version of 1.4 we tested is DP8, which was still too buggy and unstable
|
||||
to run p5.
|
||||
|
||||
the most current release has only been tested on Mac OS X 10.2.3.
|
||||
the most current release has only been tested on Mac OS X 10.2.6.
|
||||
your mileage may vary if you're running something else. actually, your
|
||||
mileage will vary no matter what, because who knows what this software
|
||||
is gonna do. you're playing with free, alpha software. get psyched!
|
||||
@@ -235,23 +232,24 @@ Update 1", the latter of which is available as a free update from the
|
||||
"Software Update" control panel. it can also be downloaded from
|
||||
http://www.apple.com/downloads/macosx/apple/ or from:
|
||||
http://www.apple.com/downloads/macosx/apple/java131.html
|
||||
for what it's worth, we don't test processing under mac os x 10.1 and
|
||||
we don't recommend it at all.
|
||||
|
||||
text area & mouse wheel.. in order to get the text area working in a
|
||||
reasonable fashion, we had to switch to using swing text components
|
||||
because of bugs in apple's java implementation. phooey on apple. the
|
||||
editor in this release should behave much better, but mouse wheel
|
||||
support is disabled until apple finishes an implementation of java
|
||||
1.4. if this makes you sad, email steve jobs and tell him to make the
|
||||
java team quit patting themselves on the back and get to work on
|
||||
finishing 1.4.
|
||||
mouse wheel support only works if you're using java 1.4. the latest
|
||||
version of java will be available via the software update control
|
||||
panel.
|
||||
|
||||
we're currently playing with the developer preview releases of 1.4,
|
||||
but haven't done anything too fancy with it yet.
|
||||
if you're having random troubles (exceptions being thrown,
|
||||
screen painting weirdness, general confusion) you might want to
|
||||
try running processing with java 1.3.1 instead. to do so,
|
||||
right-click or control-click the processing application and select
|
||||
"Show Package Contents". go to Contents -> Resources -> and then
|
||||
edit MRJApp.properties, to include the following line:
|
||||
com.apple.mrj.application.JVMVersion=1.3.1
|
||||
|
||||
"Caught java.lang.UnsatisfiedLinkError" on startup.. in order to
|
||||
use the serial port under macosx, you'll need to install RXTX,
|
||||
the serial port driver. this is for more advanced users, and the
|
||||
package is included with the p5 download. it includes its own
|
||||
in order to use the serial port under macosx, you'll need to install
|
||||
RXTX, the serial port driver. this is for more advanced users, and
|
||||
the package is included with the p5 download. it includes its own
|
||||
instructions, check inside the 'serial' folder for details.
|
||||
|
||||
naming of sketches.. on other platforms, you aren't allowed to type
|
||||
@@ -274,19 +272,15 @@ apple's bugs.
|
||||
|
||||
MAC OS 9
|
||||
|
||||
we have temporarily suspended development for mac os 9, because we
|
||||
don't have time to fight with this dying os before beta. we hope to
|
||||
resume mac os 9 development before releasing the final 1.0 version.
|
||||
|
||||
java applications on classic mac os are in a bad state, as apple has
|
||||
decided (rightfully so) to abandon further development of their java
|
||||
runtime under OS 9.
|
||||
|
||||
the most recent release (revision 46), does not run under Mac OS 9.
|
||||
this is due to a few issues that were found just before release, and
|
||||
i didn't want to hold up the release on the other platforms.
|
||||
|
||||
speed: this version runs very slowly. the first time you hit the 'run'
|
||||
button, it might take a while to bring up the actual
|
||||
program. hopefully after that, things will improve.
|
||||
|
||||
versions: this version has only been tested under Mac OS 9.2.2.
|
||||
versions: we only test under Mac OS 9.2.2, all others.. who knows?
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
@@ -307,11 +301,7 @@ to go. the advanced version is for people who already have java
|
||||
installed (and don't want to deal with the 20MB download), and know
|
||||
what they're doing enough that they can also install the serial port
|
||||
code by hand. instructions on installing the serial code are in the
|
||||
'serial' folder inside the advanced release.
|
||||
|
||||
in the most recent release, we've removed the java 1.4 runtime, so
|
||||
the download is far smaller, however you need to install java before
|
||||
processing will work. visit http://java.sun.com/getjava to download.
|
||||
'serial' folder inside the 'expert' release.
|
||||
|
||||
out of memory? try adjusting the parameters in the file 'run.bat' and
|
||||
use that to run instead of Processing.exe. short instructions can be
|
||||
|
||||
161
todo.txt
161
todo.txt
@@ -25,6 +25,14 @@ X get proper tab comments into source files
|
||||
X http://www.jwz.org/doc/tabs-vs-spaces.html
|
||||
X get proper licensing info into source files
|
||||
X fix bezier curve issues (p. 56 in illustrator spec)
|
||||
X pde_keywords.properties isn't getting copied into work/lib
|
||||
X set 'present' key command to cmd-shift-r so that p can be used for print
|
||||
X add chmod -R +x to reference after unzipping on windows
|
||||
X horizontal scroller has enormous range
|
||||
X horizontal scroller has slightly less enormous range
|
||||
X turned off weirdo scrolling
|
||||
X dim serial port menu when not available
|
||||
|
||||
|
||||
macosx
|
||||
X had to disable MRJFileUtils stuff on osx at last minute before 53
|
||||
@@ -46,8 +54,16 @@ Info.plist, setting JVMVersion
|
||||
* 1.3* - use any version of JDK 1.3.x. Do not use JDK 1.4 even if it's dflt.
|
||||
* 1.3+ - use the latest JDK version from JDK 1.3 onward, up to default JDK.
|
||||
* 1.4+ - use JDK 1.4 or later, even if an earlier JDK is the default.
|
||||
o and then edit Info.plist to include the following lines:
|
||||
o <key>JVMVersion</key> <string>1.3.1</string>
|
||||
X control-click (right-click?) for macosx doesn't show popup
|
||||
X in jedittextarea.. so added isPopupTrigger to events as well
|
||||
X take a look at sourceforge bugs
|
||||
X dataInputStream, setUseCaches on the url to false
|
||||
X URLConnection.setUseCaches(false)
|
||||
o parent.obj.close() on the url
|
||||
b X set file type/creator for .pde files.. TEXTPde1
|
||||
|
||||
|
||||
dh X save last-used serial to sketch.properties on quit
|
||||
dh X rename sketch 'can't rename' error (file being kept open)
|
||||
@@ -55,6 +71,20 @@ dh X open sketch, make a change, save, run, rename -> error
|
||||
dh X context menu cut/copy/paste
|
||||
dh X http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1052447215;start=0
|
||||
dh X http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1052077800
|
||||
dh X "look up in reference" function for selecting keywords
|
||||
|
||||
dh b _ improve the console
|
||||
dh b _ clear console each time 'run' gets hit
|
||||
dh b _ don't actually clear, just advance by the number of lines visible
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1051540041;start=0
|
||||
dh b _ maybe it needs to be a textarea?
|
||||
dh b _ printing of objects, esp when null, in jdk 14 seems to crash
|
||||
dh b _ this may have been fixed
|
||||
dh b o exception when trying to write to stdout
|
||||
dh b _ may need horizontal scroller, or text wrap
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1050328811;start=0
|
||||
dh b _ can't copy text from console directly
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1050328811
|
||||
|
||||
|
||||
..................................................................
|
||||
@@ -62,11 +92,53 @@ dh X http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;a
|
||||
|
||||
BEN'S PILE OF NEAR-IMMEDIACY (assume there's a bf next to all these)
|
||||
|
||||
bf _ horizontal scroller on the mac has enormous range
|
||||
bf _ make a note about macosx problems with 1.4
|
||||
bf _ currently the only fix is to switch to java 1.3
|
||||
|
||||
_ horizontal scroller
|
||||
macosx
|
||||
b _ change Proce55ing.app to Processing.app
|
||||
b _ should cvs be changed or just do this as a renaming step?
|
||||
b _ make a note about macosx problems with 1.4
|
||||
b _ currently the only fix is to switch to java 1.3
|
||||
b _ double-check to see if wheel mouse is working
|
||||
b _ macosx quit handler takes over ctrl-q
|
||||
b _ so file->quit doesn't get called on close
|
||||
b _ so sketch.properties doesn't get saved
|
||||
b _ handlers for basic events
|
||||
b _ MRJAboutHandler (just show splash screen)
|
||||
b _ image for 'about processing'
|
||||
b _ MRJPrefsHandler (open pde.properties in a text editor)
|
||||
b _ MRJQuitHandler (confirm quit, may need to be in another thread)
|
||||
b _ MRJOpenApplicationHandler and MRJOpenDocumentHandler
|
||||
b _ especially the open document fella
|
||||
b _ under osx, app won't get doc unless app already launched
|
||||
b _ build gl4java for java 1.4
|
||||
b _ rxtx is a problem in general.. how to improve installation
|
||||
b _ report of a problem with the rxtx installer being bad
|
||||
b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1048517796;start=0
|
||||
b _ remove 'quit' from file menu (osx only)
|
||||
b _ Event.consume() doesn't work on entry fields
|
||||
b _ manifests itself in sketch naming, can't be constrained
|
||||
b _ may not be the case under swing?
|
||||
b _ escape key not quitting presentation mode
|
||||
b _ no events seem to be coming through at all
|
||||
b _ splash screen
|
||||
b _ select all (apple-a) on azerty keyboard is quitting the app
|
||||
b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1032909986;start=0
|
||||
b _ would be nice to have macosx packaged up as a single .app file
|
||||
|
||||
_ why is the end of text messages under osx getting chopped?
|
||||
|
||||
_ why doesn't processing.app work anymore
|
||||
|
||||
_ mac 1.4 crashes when attempting to stop applets (pcho definitely)
|
||||
_ locking up on my machine after hitting stop
|
||||
_ is this only a problem when run from run.sh?
|
||||
|
||||
_ examples should be read-only
|
||||
_ stored in a separate folder from the sketchbook
|
||||
|
||||
_ move reference lookup code up into PdeBase
|
||||
_ remove ReferenceKeys class, make it an inner class
|
||||
_ add reference lookup option to the edit menu
|
||||
|
||||
_ error message dialog?
|
||||
_ maybe something that shows stack trace
|
||||
@@ -85,10 +157,17 @@ _ will need to be done for gl4java as well
|
||||
linux
|
||||
_ bring linux up to 1.4
|
||||
_ grab rxtx for linux and include with distribution
|
||||
_ pde_keywords.properties isn't getting copied into work/lib
|
||||
|
||||
buzz.pl
|
||||
opt-in/opt-out #ifdef setup
|
||||
rather than forcing people to use buzz.pl to compile. could pick
|
||||
features that are opt-out, like net, that would have comments:
|
||||
//#ifdef NET
|
||||
//#endif
|
||||
meaning that it would normally get compiled without any trouble
|
||||
or similarly, could have other sections commented out that are opt-in,
|
||||
that use #ifdefs to be enabled.`
|
||||
|
||||
bf _ take a look at sourceforge bugs
|
||||
|
||||
thesis / acg
|
||||
|
||||
@@ -102,6 +181,7 @@ bf b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Softwa
|
||||
bf b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1057393989;start=0
|
||||
|
||||
bf _ make bagel more usable as standalone
|
||||
bf _ #ifdef to remove client and server code as well
|
||||
bf _ breakout BGraphics (have its own BImage)
|
||||
bf _ breakout BApplet into BComponent ? (fix out-of-bounds mouse)
|
||||
bf _ possible use of BUtils ?
|
||||
@@ -113,6 +193,10 @@ bf _ exports pixels or a BImage or does MemoryImageSource itself
|
||||
bf _ move math functions into utility library associated
|
||||
bf _ with bagel, because those will be useful on other bagel platforms
|
||||
bf _ pApplet will call BagelMath.whatever, so still looks like cos()
|
||||
bf _ break out BSerial as separate object like BVideo
|
||||
bf _ include rxtx and the rest of that setup in subfolder
|
||||
bf _ BSerial.flush and BSerial.available in object
|
||||
|
||||
bf _ need to resolve issues between rendering screen/file
|
||||
bf _ illustrator-based rendering needs to work for ars projects
|
||||
bf _ screen may be 400x400 pixels, but file be 36x36"
|
||||
@@ -153,8 +237,9 @@ bf _ history
|
||||
bf X post something on the bboard about it
|
||||
bf _ oooh.. combine in app to show diffs
|
||||
|
||||
X console: scroll to most current line, or scroll as changing
|
||||
|
||||
_ console -> should be using JEditTextArea not TextPane
|
||||
_ scroll to most current line, or scroll as changing
|
||||
_ set decent fonts (probably same as editor above), looks bad on mac
|
||||
_ remove the border around the edge
|
||||
_ what's with the 2 blank lines on startup?
|
||||
@@ -337,8 +422,6 @@ bf b _ or buffers of specific length with a sync byte
|
||||
|
||||
BAGEL / Serial
|
||||
|
||||
b _ break out BSerial as separate object like BVideo
|
||||
b _ BSerial.flush and BSerial.available
|
||||
b _ basic usb support?
|
||||
b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1053684925
|
||||
|
||||
@@ -601,29 +684,15 @@ if you dream it, you can do it.
|
||||
|
||||
dh b _ find/replace
|
||||
dh b _ ctrl-f for find, g for find next, h for next occurrence of selected
|
||||
dh b _ "look up in reference" function for selecting keywords
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1055003940
|
||||
|
||||
|
||||
PDE / Details
|
||||
|
||||
dh b _ improve the console
|
||||
dh b _ clear console each time 'run' gets hit
|
||||
dh b _ don't actually clear, just advance by the number of lines visible
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1051540041;start=0
|
||||
dh b _ maybe it needs to be a textarea?
|
||||
dh b _ printing of objects, esp when null, in jdk 14 seems to crash
|
||||
dh b _ this may have been fixed
|
||||
dh b _ exception when trying to write to stdout
|
||||
dh b _ may need horizontal scroller, or text wrap
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1050328811;start=0
|
||||
dh b _ can't copy text from console directly
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1050328811
|
||||
dh b _ p5 becomes a memory hog (benelek and glen murphy)
|
||||
dh b _ even without sketches open, perhaps not gc'ing properly
|
||||
dh b _ objects probably not getting finalized
|
||||
dh b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1050134854;start=0
|
||||
|
||||
dh 1 _ beautify() ignores colons for case statements
|
||||
dh 1 _ need to tie this to the parser instead
|
||||
dh 1 _ background of menus on winxp is white
|
||||
@@ -631,12 +700,12 @@ dh 1 _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software
|
||||
dh 1 _ SystemColor doesn't differentiate between menu background and top
|
||||
dh 1 _ probably fixed in swing, but we're using java.awt.Menu
|
||||
dh 1 _ test by rewriting with java.awt.Menu
|
||||
dh 1 _ need to check if volume is read-only, notify and quit if it is
|
||||
dh 1 _ people are trying to run off the disk image
|
||||
dh 1 _ need to pay attention to when running from read-only drive
|
||||
dh 1 _ reported by brandenberg
|
||||
dh 1 _ "p5 will launch from the disk image, but will
|
||||
dh 1 _ not draw the sketch name bar doesn't appear"
|
||||
dh b _ need to check if volume is read-only, notify and quit if it is
|
||||
dh b _ people are trying to run off the disk image
|
||||
dh b _ need to pay attention to when running from read-only drive
|
||||
dh b _ reported by brandenberg
|
||||
dh b _ "p5 will launch from the disk image, but will
|
||||
dh b _ not draw the sketch name bar doesn't appear"
|
||||
dh 1 _ size() has memory limitations (pitaru)
|
||||
dh 1 _ catch OutOfMemoryError inside size() and let the user know
|
||||
dh 1 _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1038847001
|
||||
@@ -670,6 +739,12 @@ dh 1 _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software
|
||||
dh 1 _ scroll bar has some painting weirdness with jedit textarea
|
||||
dh 1 _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1042351684
|
||||
|
||||
1 _ dim edit menus as appropriate during selection/no selection/etc
|
||||
1 _ do objects need to be swing components to draw properly?
|
||||
1 _ macosx has update weirdness for non JComponent items
|
||||
1 _ switch to newer syntax package from jedit cvs
|
||||
1 _ is enormous horizontal scroller issue fixed properly
|
||||
|
||||
|
||||
danh couldn't replicate on win2k, but test under osx and others
|
||||
dh 1 _ rename doesn't set focus to renamer area
|
||||
@@ -801,33 +876,9 @@ b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bu
|
||||
|
||||
|
||||
DISTRIBUTION / Mac OS X
|
||||
b _ double-check to see if wheel mouse is working
|
||||
b _ handlers for basic events
|
||||
b _ MRJAboutHandler (just show splash screen)
|
||||
b _ image for 'about processing'
|
||||
b _ MRJPrefsHandler (open pde.properties in a text editor)
|
||||
b _ MRJQuitHandler (confirm quit, may need to be in another thread)
|
||||
b _ MRJOpenApplicationHandler and MRJOpenDocumentHandler
|
||||
b _ especially the open document fella
|
||||
b _ under osx, app won't get doc unless app already launched
|
||||
b _ dataInputStream, setUseCaches on the url to false
|
||||
b _ URLConnection.setUseCaches(false)
|
||||
b _ parent.obj.close() on the url
|
||||
b X set file type/creator for .pde files.. TEXTPde1
|
||||
|
||||
b _ build gl4java for java 1.4
|
||||
b _ rxtx is a problem in general.. how to improve installation
|
||||
b _ report of a problem with the rxtx installer being bad
|
||||
b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1048517796;start=0
|
||||
b _ remove 'quit' from file menu (osx only)
|
||||
b _ Event.consume() doesn't work on entry fields
|
||||
b _ manifests itself in sketch naming, can't be constrained
|
||||
b _ may not be the case under swing?
|
||||
b _ escape key not quitting presentation mode
|
||||
b _ no events seem to be coming through at all
|
||||
b _ splash screen
|
||||
b _ select all (apple-a) on azerty keyboard is quitting the app
|
||||
b _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1032909986;start=0
|
||||
1 _ set file type/creator for .pde files of examples
|
||||
|
||||
|
||||
|
||||
DISTRIBUTION / Mac OS 9
|
||||
|
||||
Reference in New Issue
Block a user