From 64f6e177b8c7e5550cf0e6e9d37912484fc8f30a Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 15 Aug 2005 00:39:28 +0000 Subject: [PATCH] more docs, add faq item to the help menu --- app/Base.java | 12 +++++++++++ app/Editor.java | 8 +++++++ core/PApplet.java | 35 ++++++++++++++++++++++--------- core/todo.txt | 5 +++++ todo.txt | 53 ++++++++++++++++++++++++----------------------- 5 files changed, 77 insertions(+), 36 deletions(-) diff --git a/app/Base.java b/app/Base.java index 588a62a27..fe94a819e 100644 --- a/app/Base.java +++ b/app/Base.java @@ -498,6 +498,18 @@ public class Base { } + /** + * Opens the local copy of the FAQ that's included + * with the Processing download. + */ + static public void showFAQ() { + //Base.openURL("http://processing.org/faq/"); + String currentDir = System.getProperty("user.dir"); + openURL(currentDir + File.separator + "faq" + + File.separator + "index.html"); + } + + /** * Implements the cross-platform headache of opening URLs */ diff --git a/app/Editor.java b/app/Editor.java index 66c8f0da5..32555fef9 100644 --- a/app/Editor.java +++ b/app/Editor.java @@ -650,6 +650,14 @@ public class Editor extends JFrame }); menu.add(item); + item = new JMenuItem("Frequently Asked Questions"); + item.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Base.showFAQ(); + } + }); + menu.add(item); + item = newJMenuItem("Find in Reference", 'F', true); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { diff --git a/core/PApplet.java b/core/PApplet.java index f880f0804..e53a3ad12 100644 --- a/core/PApplet.java +++ b/core/PApplet.java @@ -447,9 +447,12 @@ public class PApplet extends Applet /** - * Called via the first call to PApplet.paint(), - * because PAppletGL needs to have a usable screen - * before getting things rolling. + * Called by the browser or applet viewer to inform this applet that it + * should start its execution. It is called after the init method and + * each time the applet is revisited in a Web page. + *

+ * Called explicitly via the first call to PApplet.paint(), because + * PAppletGL needs to have a usable screen before getting things rolling. */ public void start() { if (javaVersion < 1.3f) return; @@ -460,9 +463,17 @@ public class PApplet extends Applet } - // maybe start should also be used as the method for kicking - // the thread on, instead of doing it inside paint() - public void stop() { + /** + * Called by the browser or applet viewer to inform + * this applet that it should stop its execution. + *

+ * Unfortunately, there are no guarantees from the Java spec + * when or if stop() will be called (i.e. on browser quit, + * or when moving between web pages), and it's not always called. + */ + public void stop() { + // maybe start should also be used as the method for kicking + // the thread on, instead of doing it inside paint() //finished = true; // why did i comment this out? //System.out.println("stopping applet"); @@ -476,9 +487,13 @@ public class PApplet extends Applet /** - * This also calls stop(), in case there was an inadvertent - * override of the stop() function by a user. - * + * Called by the browser or applet viewer to inform this applet + * that it is being reclaimed and that it should destroy + * any resources that it has allocated. + *

+ * This also attempts to call PApplet.stop(), in case there + * was an inadvertent override of the stop() function by a user. + *

* destroy() supposedly gets called as the applet viewer * is shutting down the applet. stop() is called * first, and then destroy() to really get rid of things. @@ -486,7 +501,7 @@ public class PApplet extends Applet * when moving between pages), though. */ public void destroy() { - stop(); + ((Papplet)this).stop(); } diff --git a/core/todo.txt b/core/todo.txt index ffed21464..0f2327562 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -20,6 +20,11 @@ X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Contribution_3DOpen o noLoop() is behaving strangely o http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1116002432;start=0 +_ stop() not getting called +_ and start() is supposedly called by the applet viewer +_ http://java.sun.com/j2se/1.4.2/docs/api/java/applet/Applet.html#start() +_ need to track this stuff down a bit + _ prevent PGraphics.save() from inserting a file prefix _ so that people can use absolute paths _ or add a version that takes a file object diff --git a/todo.txt b/todo.txt index fdb6bdde1..e447b1d44 100644 --- a/todo.txt +++ b/todo.txt @@ -41,6 +41,8 @@ X faq: "my applet doesn't work on export"... where to check for errors X very common: cached version is being used X go through methods to properly flush the cache X can also just change the name +X make a note in the library howto about using something besides p5 +X add the faq to the help menu fixed in previous releases X closing window w/o first hitting stop() causes freak out @@ -56,12 +58,35 @@ X worker thread is halting the app ala code folder bug X could this be dealt with by using nio? X host environment will be running 1.4 so... +bugzilla problems (fixed by fjen) +X localconfig has been modified, need to update for everything +X "back to bug #110" should be on one line +X text fields on "post bug" won't let me click +X (i.e. "Reassign bug to" and "duplicate of bug #") +X continually de-select themselves so i can't paste or type text +X remove "platform" and "severity".. set them to "all" and "normal" +X buglist.cgi +X replace the platform column with the os column (uses icons for os) +X sorting based on any of the headings gives an error +X "102 bugs found. 102 bugs found." +X remove the severity column +X it's normal or enhanced, and enhanced is already gray +X make os into: Mac OS, Windows, Linux, Other +X while other categories might exist, it's too confusing for minimal benefit +o make things that are P5 into "enhancement" +o unless a P6 can be added? or something called "enhancement"? +X is there a way to list "all" bugs (especially sorted by priority?) +X or at least the first 20 listed by priority? + +forum bugs +X when replying, all the replies so far are listed twice +o fonts are wrong all over the place (use windows to debug) + + _ properly handle non-ascii chars in p5 folder name _ http://dev.processing.org/bugs/show_bug.cgi?id=49 _ or at least warn the user to install somehwere else -_ make a note in the library howto about using something besides p5 - _ don't allow subfolders forever inside the sketchbook folder _ once a sketch is found, don't recurse deeper _ same for libraries, cuz this makes a mess @@ -76,30 +101,6 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=117 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -bugzilla problems -X localconfig has been modified, need to update for everything -_ "back to bug #110" should be on one line -_ text fields on "post bug" won't let me click -_ (i.e. "Reassign bug to" and "duplicate of bug #") -_ continually de-select themselves so i can't paste or type text -_ remove "platform" and "severity".. set them to "all" and "normal" -_ buglist.cgi -_ replace the platform column with the os column (uses icons for os) -_ sorting based on any of the headings gives an error -_ "102 bugs found. 102 bugs found." -_ remove the severity column -_ it's normal or enhanced, and enhanced is already gray -X make os into: Mac OS, Windows, Linux, Other -X while other categories might exist, it's too confusing for minimal benefit -o make things that are P5 into "enhancement" -o unless a P6 can be added? or something called "enhancement"? -_ is there a way to list "all" bugs (especially sorted by priority?) -_ or at least the first 20 listed by priority? - -forum bugs -_ when replying, all the replies so far are listed twice -_ fonts are wrong all over the place (use windows to debug) - _ emacs keybindings _ general (easier to support) _ ctrl-space to set selection start