From eb812249373ef3e65296ad94a2245bb345221d2b Mon Sep 17 00:00:00 2001 From: benfry Date: Thu, 1 Aug 2002 01:45:54 +0000 Subject: [PATCH] X much reworking for run/present modes X run/present modes are getting confused X [esc] to exit presentation mode X remove 'edit' menu because it's worthless --- app/KjcEngine.java | 198 ++++++++++----------------- app/PdeBase.java | 19 ++- app/PdeEditor.java | 269 +++++++++++++------------------------ app/PdeEditorButtons.java | 20 ++- build/shared/readme.txt | 19 +++ build/windows/dist/run.bat | 2 +- done.txt | 66 +++++++++ todo.txt | 114 +++++++--------- 8 files changed, 322 insertions(+), 385 deletions(-) diff --git a/app/KjcEngine.java b/app/KjcEngine.java index b3609fec6..ab22e982e 100644 --- a/app/KjcEngine.java +++ b/app/KjcEngine.java @@ -568,31 +568,17 @@ public class KjcEngine extends PdeEngine { Insets parentInsets = frame.getInsets(); int x1 = parentLoc.x - 20; - //int y1 = parentLoc.y + parentInsets.top; // for Window version - int y1 = parentLoc.y; // + parentInsets.top; + int y1 = parentLoc.y; - // then instantiate class poo using class.forName try { if (PdeBase.getBoolean("play.external", false)) { String cmd = PdeBase.get("play.externalCommand"); - - //System.out.println( - process = Runtime.getRuntime().exec(/*"cmd /c " +*/ cmd + " " + tempClass + + process = Runtime.getRuntime().exec(/*"cmd /c " +*/ + cmd + " " + tempClass + " " + x1 + " " + y1); new KjcMessageSiphon(process.getInputStream(), process.getErrorStream(), leechErr); - //tempClass + " " + portnum); - //umbilical = new ServerSocket(portnum); - //umbilical.accept(); - //portnum++; - - //InputStream is = process.getErrorStream(); - //InputStream is = process.getInputStream(); - //while (true) { - //System.out.print((char) is.read()); - //} - } else { // temporarily disabled //KjcClassLoader loader = new KjcClassLoader(buildPath); @@ -609,6 +595,17 @@ public class KjcEngine extends PdeEngine { if (editor.presenting) { window = new Window(new Frame()); + window.addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { + //editor.doClose(); + //new DelayedClose(editor); + stop(); + editor.doClose(); + } + } + }); + } else { window = new Frame(); // gonna use ugly windows instead ((Frame)window).setResizable(false); @@ -616,14 +613,28 @@ public class KjcEngine extends PdeEngine { window.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { - //System.exit(0); + stop(); editor.doClose(); + //new DelayedClose(editor); + //editor.doClose(); + //editor.doStop(); } }); } if (!(window instanceof Frame)) y1 += parentInsets.top; window.add(applet); + applet.addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { + stop(); + editor.doClose(); + //new DelayedClose(editor); + //editor.doClose(); + } + } + }); + // @#$((* java 1.3 // removed because didn't seem to be needed anymore // also, was causing offset troubles @@ -665,106 +676,8 @@ public class KjcEngine extends PdeEngine { applet.setBounds((ww - applet.width)/2, insets.top + ((wh-insets.top-insets.bottom) - applet.height)/2, ww, wh); - /* - window.setBounds(x1 - applet.width, y1, - //parentLoc.x - (applet.width + 20), - //parentLoc.y + parentInsets.top, - applet.width, applet.height); - */ } - //new WindowDragger(window, applet.height); - /* - window.add(new MouseMotionAdapter() { - int px, py; - - public mouseDragged(MouseEvent e) { - } - }); - */ - - /* - window.addWindowListener(new WindowAdapter() { - public void windowOpened(WindowEvent e) { - System.out.println(e); - } - - public void windowClosing(WindowEvent e) { - System.out.println(e); - } - - public void windowClosed(WindowEvent e) { - System.out.println(e); - } - - public void windowIconified(WindowEvent e) { - System.out.println(e); - } - - public void windowDeiconified(WindowEvent e) { - System.out.println(e); - } - - public void windowActivated(WindowEvent e) { - System.out.println(e); - } - - public void windowDeactivated(WindowEvent e) { - System.out.println(e); - } - }); - */ - - /* - window.addComponentListener(new ComponentAdapter() { - public void componentResized(ComponentEvent e) { - Frame f = (Frame) e.getComponent(); // me - Rectangle bounds = f.getBounds(); - Insets insets = f.getInsets(); - System.out.println(insets); - - if ((bounds.x == -insets.left) && - (bounds.y == -insets.bottom)) { // half-assed maximizing - - Dimension screen = - Toolkit.getDefaultToolkit().getScreenSize(); - - //System.out.println(f.getInsets()); - //System.out.println(e.getComponent().getClass()); - System.out.println("asking for bounds " + - (screen.height + insets.top + insets.bottom)); - f.setBounds(-insets.left, -insets.top, - screen.width + insets.left + insets.right, - screen.height + insets.top + insets.bottom); - - f.doLayout(); - // center the applet in the window - - } - System.out.println(e); - } - - public void componentMoved(ComponentEvent e) { - //System.out.println(e); - } - - public void componentShown(ComponentEvent e) { - //System.out.println(e); - } - - public void componentHidden(ComponentEvent e) { - //System.out.println(e); - } - }); - - window.add(applet, BorderLayout.CENTER); - window.add(new Label(), BorderLayout.NORTH); - window.add(new Label(), BorderLayout.SOUTH); - window.add(new Label(), BorderLayout.EAST); - window.add(new Label(), BorderLayout.WEST); - */ - - //window.pack(); applet.setVisible(true); // no effect if (windowLocation != null) { window.setLocation(windowLocation); @@ -774,12 +687,7 @@ public class KjcEngine extends PdeEngine { } running = true; - //while (running) { } - // since this is already contained in a thread - //applet.run(); - //need to parse this code to give a decent error message - //internal error //java.lang.NullPointerException // at ProcessingApplet.colorMode(ProcessingApplet.java:652) @@ -795,11 +703,6 @@ public class KjcEngine extends PdeEngine { } - //public void front() { // part of PdeEngine - //window.toFront(); - //} - - protected void cleanup() { File buildDir = new File(buildPath); if (!buildDir.exists()) buildDir.mkdirs(); @@ -892,6 +795,17 @@ public class KjcEngine extends PdeEngine { } + /* +class DelayedClose { + public DelayedClose(PdeEditor ed) { + System.out.println("stopping"); + stop(); + System.out.println("successful"); + ed.doClose(); + } +} + */ + //public void inform(String message) { //System.out.println("informing: " + message); //} @@ -1059,6 +973,38 @@ class KjcMessageStream extends OutputStream { } +/* + class DelayedClose implements Runnable { + PdeEditor ed; + Thread thread; + + public DelayedClose(PdeEditor ed) { + this.ed = ed; + thread = new Thread(this); + thread.start(); + } + + public void run() { + boolean finished = false; + + while (!finished) { + ed.doStop(); + System.out.println("delayed close stage 1"); + if (Thread.currentThread() == thread) { + System.out.println("delayed close stage 2"); + try { + Thread.sleep(2000); + } catch (InterruptedException e) { } + System.out.println("closing now"); + ed.doClose(); + finished = true; + } + } + } + } +*/ + + /* class WindowDragger implements MouseListener, MouseMotionListener { Window window; diff --git a/app/PdeBase.java b/app/PdeBase.java index 2f55cbaab..be6186e0f 100644 --- a/app/PdeBase.java +++ b/app/PdeBase.java @@ -183,6 +183,7 @@ public class PdeBase implements ActionListener { // beautify, open, print, play save were key commands // completely un-functional edit menu + /* menu = new Menu("Edit"); menu.add(new MenuItem("Undo")); menu.addSeparator(); @@ -193,11 +194,12 @@ public class PdeBase implements ActionListener { menu.add(new MenuItem("Select all")); menu.setEnabled(false); menubar.add(menu); + */ menu = new Menu("Sketch"); menu.add(new MenuItem("Run", new MenuShortcut('R'))); menu.add(new MenuItem("Present", new MenuShortcut('P'))); - menu.add(new MenuItem("Stop")); + menu.add(new MenuItem("Stop", new MenuShortcut('T'))); menu.addSeparator(); recordingHistory = getBoolean("history.recording", true); @@ -517,10 +519,15 @@ public class PdeBase implements ActionListener { editor.doRun(false); } else if (command.equals("Present")) { - editor.doPresent(); + editor.doRun(true); + //editor.doPresent(); } else if (command.equals("Stop")) { - editor.doStop(); + if (editor.presenting) { + editor.doClose(); + } else { + editor.doStop(); + } } else if (command.equals("Refresh")) { //System.err.println("got refresh"); @@ -627,9 +634,9 @@ public class PdeBase implements ActionListener { Integer.parseInt(st.nextToken())); } - static public boolean isMacintosh() { - return System.getProperty("os.name").toLowerCase().indexOf("mac") != -1; - } + //static public boolean isMacintosh() { + //return System.getProperty("os.name").toLowerCase().indexOf("mac") != -1; + //} // used by PdeEditorButtons, but probably more later diff --git a/app/PdeEditor.java b/app/PdeEditor.java index 6ee76f7c5..46b49bcf0 100644 --- a/app/PdeEditor.java +++ b/app/PdeEditor.java @@ -71,7 +71,7 @@ public class PdeEditor extends Panel { PdeBase base; - public PdeEditor(PdeBase base /*String program*/) { + public PdeEditor(PdeBase base) { this.base = base; setLayout(new BorderLayout()); @@ -94,15 +94,11 @@ public class PdeEditor extends Panel { Panel rightPanel = new Panel(); rightPanel.setLayout(new BorderLayout()); - //header = new PdeEditorHeader(this, "untitled", "default"); - //userName = "default"; - header = new PdeEditorHeader(this /*, "", userName*/); - // need to open a file or hit new right away + header = new PdeEditorHeader(this); rightPanel.add("North", header); - //if (program == null) program = DEFAULT_PROGRAM; textarea = - new TextArea("", //program, + new TextArea("", PdeBase.getInteger("editor.program.rows", 20), PdeBase.getInteger("editor.program.columns", 60), TextArea.SCROLLBARS_VERTICAL_ONLY); @@ -125,10 +121,61 @@ public class PdeEditor extends Panel { PdeEditorListener listener = new PdeEditorListener(this); textarea.addKeyListener(listener); textarea.addFocusListener(listener); - //textarea.addKeyListener(new PdeKeyListener(this)); - //} - //runner = new PdeRunner(this); + Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); + if ((PdeBase.platform == PdeBase.MACOSX) || + (PdeBase.platform == PdeBase.MACOS9)) { + presentationWindow = new Frame(); + + // mrj is still (with version 2.2.x) a piece of shit, + // and doesn't return valid insets for frames + //presentationWindow.pack(); // make a peer so insets are valid + //Insets insets = presentationWindow.getInsets(); + // the extra +20 is because the resize boxes intrude + Insets insets = new Insets(21, 5, 5 + 20, 5); + + presentationWindow.setBounds(-insets.left, -insets.top, + screen.width + insets.left + insets.right, + screen.height + insets.top + insets.bottom); + } else { + presentationWindow = new Window(new Frame()); + presentationWindow.setBounds(0, 0, screen.width, screen.height); + } + + Label label = new Label("stop"); + //label.setBackground(Color.red); + label.addMouseListener(new MouseAdapter() { + public void mousePressed(MouseEvent e) { + //System.out.println("got stop"); + //doStop(); + doClose(); + +#ifdef JDK13 + // move editor to front in case it was hidden + frame.setState(Frame.NORMAL); +#endif + }}); + + //Dimension labelSize = label.getPreferredSize(); + Dimension labelSize = new Dimension(60, 20); + presentationWindow.setLayout(null); + presentationWindow.add(label); + label.setBounds(5, screen.height - 5 - labelSize.height, + labelSize.width, labelSize.height); + + Color presentationBgColor = + PdeBase.getColor("run.present.bgcolor", new Color(102, 102, 102)); + presentationWindow.setBackground(presentationBgColor); + + // windowActivated doesn't seem to do much, so focus listener better + presentationWindow.addFocusListener(new FocusAdapter() { + public void focusGained(FocusEvent e) { + //if (frame != null) frame.toFront(); // editor to front + try { + engine.window.toFront(); + } catch (Exception ex) { } + } + }); } @@ -160,7 +207,6 @@ public class PdeEditor extends Panel { int screenH = Integer.parseInt(skprops.getProperty("screen.h", "-1")); Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); - if ((windowX != -1) && (screen.width == screenW) && (screen.height == screenH)) { //System.out.println("setting bounds of frame"); @@ -338,7 +384,7 @@ public class PdeEditor extends Panel { } - public void doRun(boolean presentation) { + public void doRun(boolean present) { //System.out.println(System.getProperty("java.class.path")); //doStop(); @@ -346,10 +392,15 @@ public class PdeEditor extends Panel { running = true; buttons.run(); - //runner.setProgram(textarea.getText()); - //runner.start(); + presenting = present; try { + if (presenting) { + presentationWindow.show(); + presentationWindow.toFront(); + //doRun(true); + } + String program = textarea.getText(); makeHistory(program, RUN); @@ -369,6 +420,7 @@ public class PdeEditor extends Panel { engine = new KjcEngine(this, program, buildPath, dataPath); //engine.start(); + //engine.start(presenting ? presentLocation : appletLocation); engine.start(presenting ? presentLocation : appletLocation); //System.out.println("done iwth engine.start()"); //} @@ -394,158 +446,25 @@ public class PdeEditor extends Panel { } - public void doPresent() { - // full screen, but also no frame on the launched window - - if (presentationWindow == null) { - Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); - if (PdeBase.isMacintosh()) { - presentationWindow = new Frame(); - - // mrj is still (with version 2.2.x) a piece of shit, - // and doesn't return valid insets for frames - //presentationWindow.pack(); // make a peer so insets are valid - //Insets insets = presentationWindow.getInsets(); - // the extra +20 is because the resize boxes intrude - Insets insets = new Insets(21, 5, 5 + 20, 5); - //System.out.println(insets); - - presentationWindow.setBounds(-insets.left, -insets.top, - screen.width + insets.left + insets.right, - screen.height + insets.top + insets.bottom); - } else { - presentationWindow = new Window(new Frame()); - presentationWindow.setBounds(0, 0, screen.width, screen.height); - } - - // full screen window needs to have method to stop - // for now, click on small 'stop' text in lower-lefthand corner - // will a label catch mouse events? - //Label label = new Label("stop"); - Label label = new Label("stop"); - //label.setBackground(Color.red); - label.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent e) { - //System.out.println("got stop"); - doStop(); - -#ifdef JDK13 - // move editor to front in case it was hidden - frame.setState(Frame.NORMAL); -#endif - //frame.hide(); - //frame.show(); - } - }); - - //Dimension labelSize = label.getPreferredSize(); - Dimension labelSize = new Dimension(60, 20); - presentationWindow.setLayout(null); - presentationWindow.add(label); - label.setBounds(5, screen.height - 5 - labelSize.height, - labelSize.width, labelSize.height); - //System.out.println(labelSize + " " + label.getBounds()); - - Color presentationBgColor = - PdeBase.getColor("run.present.bgcolor", new Color(102, 102, 102)); - presentationWindow.setBackground(presentationBgColor); - - /* - presentationWindow.addWindowListener(new WindowAdapter() { - public void windowActivated(WindowEvent e) { - System.out.println("activated"); - } - } - ); - */ - - // windowActivated doesn't seem to do much, so focus listener better - presentationWindow.addFocusListener(new FocusAdapter() { - public void focusGained(FocusEvent e) { - //System.out.println("pwindow activated"); - // editor doesn't necessarily have to be on top - //presentationWindow.toBack(); - - // don't move the editor window to the front after all - //if (frame != null) frame.toFront(); - try { - //((KjcEngine)(runner.engine)).window.toFront(); - engine.window.toFront(); - } catch (Exception ex) { } - } - } - ); - } - presentationWindow.show(); - presentationWindow.toFront(); - - // not sure what to do with applet.. - // (since i can't bring the browser window to the front) - // unless there's a method in AppletContext - //if (frame != null) frame.toFront(); - - /* - try { - //System.out.println("my parent is " + getParent()); - ((PdeApplication)getParent()).frame.toFront(); - } catch (Exception e) { } - */ - - try { - //((KjcEngine)(runner.engine)).window.toFront(); - engine.window.toFront(); - - } catch (Exception e) { - // rather than writing code to check all the posible - // errors with the above statement, just fail quietly - //System.out.println("couldn't bring kjc engine window forward"); - } - //if (runner.engine != null) { - //if (runner.engine instanceof KjcEngine) { - //} - //} - - //buttons.clear(); - - presenting = true; - doRun(true); - } - - - // #ifdef RECORDER - // public void doRecord() { - // //doStop(); - // doClose(); - // PdeRecorder.start(this, graphics.width, graphics.height); - // doRun(); - // } - //#endif - public void doStop() { + /* if (presenting) { presenting = false; // to avoid endless recursion doClose(); - presentationWindow.hide(); + //presentationWindow.hide(); + return; } + */ - //#ifdef RECORDER - // if (!running) return; - //#endif - - //terminate(); - // following 3 replace terminate - //runner.stop(); - //System.out.println("doStop, engine is " + engine); + //System.out.println("stop1"); if (engine != null) engine.stop(); + //System.out.println("stop2"); message(EMPTY); - + //System.out.println("stop3"); buttons.clear(); + //System.out.println("stop4"); running = false; - - //if (presenting) { - //presentationWindow.hide(); - //presenting = false; - //} + //System.out.println("stop5"); } @@ -553,40 +472,32 @@ public class PdeEditor extends Panel { // may just roll this in with the other code // -> keep this around for closing the external window public void doClose() { - // grab window position - //if (engine != null) { - try { - if ((presentationWindow == null) || - (!presentationWindow.isVisible())) { + //System.out.println("doclose1"); + if (presenting) { + presentationWindow.hide(); + //if ((presentationWindow == null) || + //(!presentationWindow.isVisible())) { + + } else { + try { appletLocation = engine.window.getLocation(); - } - // prone to bugs and doesn't work yet - // if ((presentationWindow != null) && - // (presentationWindow.isVisible())) { - // presentLocation = engine.window.getLocation(); - // } - } catch (NullPointerException e) { } + } catch (NullPointerException e) { } + } + //System.out.println("doclose2"); if (running) { //System.out.println("was running, will call doStop()"); doStop(); } - // some code to close the window here + //System.out.println("doclose3"); try { - // runner.engine is null (runner is not) - //((KjcEngine)(runner.engine)).close(); - engine.close(); - - // runner shouldn't be set to null because it gets reused - //System.err.println("runner = " + runner); - //runner = null; - // engine not reused + engine.close(); // kills the window engine = null; // will this help? } catch (Exception e) { } - - buttons.clear(); + //System.out.println("doclose4"); + //buttons.clear(); // done by doStop } diff --git a/app/PdeEditorButtons.java b/app/PdeEditorButtons.java index 17013e952..3164ccea2 100644 --- a/app/PdeEditorButtons.java +++ b/app/PdeEditorButtons.java @@ -342,14 +342,22 @@ public class PdeEditorButtons extends Panel /*implements ActionListener*/ { switch (currentSelection) { case RUN: - if (e.shiftDown()) { - editor.doPresent(); - } else { - editor.doRun(false); - } + editor.doRun(e.shiftDown()); + //if (e.shiftDown()) { + //editor.doPresent(); + //} else { + //editor.doRun(false); + //} break; - case STOP: setState(RUN, INACTIVE, true); editor.doStop(); break; + case STOP: + setState(RUN, INACTIVE, true); + if (editor.presenting) { + editor.doClose(); + } else { + editor.doStop(); + } + break; //case CLOSE: editor.doClose(); break; //case OPEN: editor.doOpen(); break; diff --git a/build/shared/readme.txt b/build/shared/readme.txt index 8356f4bf2..c6685af98 100644 --- a/build/shared/readme.txt +++ b/build/shared/readme.txt @@ -137,6 +137,25 @@ VERSIONS: this version has only been tested under Mac OS 9.2.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +WHAT IS SKETCHBOOK? + +>>>>>>>>>>>>>> NEED TO WRITE THIS SECTION <<<<<<<<<<<<<<<< + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + +EXTERNAL FILES / FONTS / READING DATA FILES + + +things need to go in a folder called 'data' inside sketchbook/default + +>>>>>>>>>>>>>> NEED TO WRITE THIS SECTION <<<<<<<<<<<<<<<< + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + SERIAL PORT the serial port is a useful way to hook things up to hardware diff --git a/build/windows/dist/run.bat b/build/windows/dist/run.bat index 5b98c143f..d63aa02c2 100755 --- a/build/windows/dist/run.bat +++ b/build/windows/dist/run.bat @@ -1,2 +1,2 @@ @echo off -.\java\bin\java -cp lib;lib\build;lib\pde.jar;lib\kjc.jar;lib\oro.jar;java\lib\ext\comm.jar \ No newline at end of file +.\java\bin\java -cp lib;lib\build;lib\pde.jar;lib\kjc.jar;lib\oro.jar;java\lib\ext\comm.jar PdeBase \ No newline at end of file diff --git a/done.txt b/done.txt index e50195b4b..717a3ed0b 100644 --- a/done.txt +++ b/done.txt @@ -1,3 +1,69 @@ +0039 BUGS WITH CODE +//BFont font1; +//BFont font2; +//font1 = loadFont("Univers76.vlw.gz"); +//font2 = loadFont("Bodoni.vlw.gz"); +println("Univers76.vlw.gz"); +float a = 80.4; +float b = .7; +float c = (b * 20.3); +float d = 10; +fill(a, b, c); +rect(a, b, c, c); + + +0038 +X set bg color on macos9 buttons as well +X get icon in macos9/macosx/windows formats +X wahoo! figure out how to do do simple .exe with icons +o use launcher code from sun jre +o needs to be built from command line +X keyPressed() and others weren't being called +X serial work under windows +X make bapplet a serialporteventlistener +X remove 'public' from beginner listener event handlers +X trying to make eventlistener work +X comm.jar has to be in classpath for kjc (interesting) +X fixed launcher.exe because of problems in classpath +X how to make double-clickable version for osx +X might be as simple as combined jar with manifest and symlink +X jar doesn't like opening pde.properties b/c getClass fails +X app title comes up as PdeBase +X -Xdock:name property or +X com.apple.mrj.application.apple.menu.about.name (gulp) +X -XDock:icon (lowercase dock?) to set icon, or +X .icns file in the Contents/Resources of the bundle +X check tn on java runtime properties for macosx +X need fxns to test platform and java version +X serial works poorly for starting/stopping applets +X appears to be fixed through use of static object in bagel +X breaks on every 2nd run when using serial apps (or others?) +X try calling gc on stop as well +X make it simpler to build the code.. +X buzz.pl actually no longer needed (no ifdefs) +o use a regular makefile for everything +X getResource stuff breaks, sketch.properties can't save +X FileNotFoundException: /FILE9/+/sketch.properties +X doc: requires java 1.3.1 update 1 +X button backgrounds are weird since not square +X (seen when asking to save a file etc) +X see if possible to set background of button object +X or maybe just background of the awt object it sits on +X get casey's examples into the sketchbook +X these should become the standard test cases for everything +o crashes when people click on help in top bar (same in DBN) [macos9] +X not reproduced.. mrjappbuilder seems stabler? +X use osx utilities to setfileinfo for .jar files etc +o try to build macutils under osx +X bug where pde.properties was being replaced for sketch.properties +X changed pde.properties_PLATFORM -> pde_PLATFORM.properties +X f subst problems: include , and ; as allowable +X float f = 0.3; and fill(0.3, 0.2, 0.1); +X windows needs to work from the .exe +X also included run.bat just in case +X test the gcc executable, and tweak dist script accordingly + + 0037 X copying files from 'data' dir is not recursive.. fixed X move structure of app/application dirs around a bit diff --git a/todo.txt b/todo.txt index 221bc28f3..bc9897a6e 100644 --- a/todo.txt +++ b/todo.txt @@ -1,61 +1,18 @@ -0038 -X set bg color on macos9 buttons as well -X get icon in macos9/macosx/windows formats -X wahoo! figure out how to do do simple .exe with icons -o use launcher code from sun jre -o needs to be built from command line -X keyPressed() and others weren't being called -X serial work under windows -X make bapplet a serialporteventlistener -X remove 'public' from beginner listener event handlers -X trying to make eventlistener work -X comm.jar has to be in classpath for kjc (interesting) -X fixed launcher.exe because of problems in classpath -X how to make double-clickable version for osx -X might be as simple as combined jar with manifest and symlink -X jar doesn't like opening pde.properties b/c getClass fails -X app title comes up as PdeBase -X -Xdock:name property or -X com.apple.mrj.application.apple.menu.about.name (gulp) -X -XDock:icon (lowercase dock?) to set icon, or -X .icns file in the Contents/Resources of the bundle -X check tn on java runtime properties for macosx -X need fxns to test platform and java version -X serial works poorly for starting/stopping applets -X appears to be fixed through use of static object in bagel -X breaks on every 2nd run when using serial apps (or others?) -X try calling gc on stop as well -X make it simpler to build the code.. -X buzz.pl actually no longer needed (no ifdefs) -o use a regular makefile for everything -X getResource stuff breaks, sketch.properties can't save -X FileNotFoundException: /FILE9/+/sketch.properties -X doc: requires java 1.3.1 update 1 -X button backgrounds are weird since not square -X (seen when asking to save a file etc) -X see if possible to set background of button object -X or maybe just background of the awt object it sits on -X get casey's examples into the sketchbook -X these should become the standard test cases for everything -o crashes when people click on help in top bar (same in DBN) [macos9] -X not reproduced.. mrjappbuilder seems stabler? -X use osx utilities to setfileinfo for .jar files etc -o try to build macutils under osx -X bug where pde.properties was being replaced for sketch.properties -X changed pde.properties_PLATFORM -> pde_PLATFORM.properties -X f subst problems: include , and ; as allowable -X float f = 0.3; and fill(0.3, 0.2, 0.1); -X windows needs to work from the .exe -X also included run.bat just in case - - 0039 -a _ make win/linux write stderr to stderr.txt like the mac -a _ this will be useful until i implement scrollbar +X left PdeBase out of the run.bat in windows.. piss me. +X need comprehensive set of tests for 'f' substitution scenarios +X here is the test code to see if it's fixed +X much reworking for run/present modes +X run/present modes are getting confused +X [esc] to exit presentation mode +X remove 'edit' menu because it's worthless + bagel a _ serial -a _ pde menu item for listing serial ports available +a _ some method for getting list of serial ports +a _ pde menu item for listing serial ports available +a _ could just println them to the console a _ import javax.comm stuff as standard in kjc (not in applet) pde @@ -64,12 +21,18 @@ a _ click on project name to quickly go to rename mode a _ make scrollbar for console a _ remove projects if created but nothing happens to them a _ see if play being highlighted can be implemented again +a _ text editor? jedit's textarea class? hmm? hmm? +a _ make win/linux write stderr to stderr.txt like the mac +a _ this will be useful until i implement scrollbar macos9 a _ apple control keys register as edit events in buffer a _ use Toolkit.getShortcutKeymask() to figure out what's up a _ set file type/creator for .pde files.. TEXTPde1 +macosx +a _ test presentation mode for window sizing status + macos a _ implement menuitem to load ref and to launch p5.net a _ MRJFileUtils.openURL(String url) throws IOException @@ -82,11 +45,9 @@ a _ parent.obj.close() on the url a _ check to see if lines for error messages are off windwows +a _ build 'release' version of app, wants MFC42D.dll a _ splash screen.. check win95 book for simple code -linux -a _ test the gcc executable, and tweak dist script accordingly - release a _ add 'readme.txt' to dist.sh.. change notes to revisions a _ add examples to dist.sh scripts @@ -95,9 +56,10 @@ a _ or small script to remove CVS directories from a tree a _ check osname under win98 and linux a _ information on how to submit bugs to p5-bugs@proce55ing.net a _ include release number, platform, and a copy of the code -a _ need comprehensive set of tests for 'f' substitution scenarios web / docs +a _ change download/index.html to not describe dates but process +a _ "this is alpha, we're heading to beta with series of sm releases" a _ check on linefeeds and other errors with bbs on web site a _ online discussion/talk system (gets people using the site too) a _ online signup cgi for people to add themselves to the list @@ -107,16 +69,19 @@ a _ bugzilla but simpler a _ would also be nice for people to be able to vote on features a _ document serial a bit more in release notes -dammit we need a text editor. -gonna get sick of people bitching about it. -also an interesting possibility (for tech-minded only) - use terminal emulator, and run iostream from process - use pooterm stuff for the emulation window - key commands would conflict - but could use emacs under osx, linux - use nano (maybe emacs?) under windows - and nothing for macos9 +a _ can't get fonts to load +a _ bagel complaint: could not load font Univerx76.vlw.gz +a _ why the x? what's going on? +BFont font; +font = loadFont("Univers76.vlw.gz"); +//font = loadFont("Bodoni.vlw.gz"); +//BFont font = loadFont("Univerx76.vlw.gz"); +setFont(font); +String happy = "FontTest"; +//float happyWidth = font.stringWidth(happy); +//text(happy, (width - happyWidth)/2, 10); +text(happy, 20, 50); a _ this code is not performing correctly BImage b; // declare variable "b" of type BImage @@ -139,6 +104,8 @@ endShape(); a _ first a syntax error, when fixed, causes NullPointerException  a _ quitting the app makes things all better. argh. +a _ this just started with version37, it happens extrememely +a _ frequently and should be easy to reproduce the error // problematic version color rr = #FFCC00; fill(255); @@ -314,6 +281,8 @@ b _ need to add randomizer to even non-self gen'd classes b _ or figure out how to unload old classes.. grr b _ lockup when something missing from classpath on dynamic load b _ but makes no error.. peditorconsole probably swallowing it +b _ change writeJava/start functions to be combined in kjc +b _ but the rest inside PdeEditor that takes care of launching/placing PDE / medium @@ -658,6 +627,17 @@ _ use for window title _ simple app that does swapping of letters as an animation +dammit we need a text editor. +gonna get sick of people bitching about it. +also an interesting possibility (for tech-minded only) + use terminal emulator, and run iostream from process + use pooterm stuff for the emulation window + key commands would conflict + but could use emacs under osx, linux + use nano (maybe emacs?) under windows + and nothing for macos9 + + BUILDING P5 -> where to install jikes, jre, others? jre may need to be back in cvs, but annoying for dist