Version 0.9.38.2 ---------------- Added commands NOROUNDING and SETROUNDING. Added operators LABELHEIGHT, LINECAP, and PENPATTERN. Fixed bug where missing closing bracket or parenthesis was not reported. Improved an error message for missing input in a procedure invocation. When error message was "XXX doesn't output value" and it now has "; YYY expects more inputs" appended onto it. Ignore spaces following tilde when they are the only thing between tilde and a newline Fix bug when non-sourcecode is treated as sourcecode and colorified, e.g., comment with missing leading ';' caused NullPointerException. Fix bug where incomplete procedure definition in Editor was not reported as error and CommandCenter was left in procedure definition mode. Fix bug where Editor contents would not be interpreted when focus left Editor even though changes had been made. Version 0.9.38.1 ---------------- Added PI operator. Added ARC, SETLINECAP, and SETPENPATTERN commands. Improved error messages associated with Arrays, Lists, and Words. The source token is highlighted where previously it wasn't. Tilde ending comment is just part of the comment. ARCTAN with two inputs, surrounded with parenthesis, e.g., (ARCTAN x y), outputs the arctangent of y/x, if x is nonzero, or 90 or -90 depending on the sign of y, if x is zero. TGFillOp, TGLineOp, and TGSetPixelsOp now take advantage of Java Graphics2D and BufferedImage classes. They are now much faster. Version 0.9.38 -------------- Support of single character infix symbolic operators with precedence (+, -, *, /, <, =, and >). Added GREATEREQUAL? and LESSEQUAL? operators, but do not support multi-character symbolic equivilents yet, i.e., >= and <=. Version 0.9.37.9 ---------------- Added low-level support for infix operators (+, -, *, /, <, =, and >). These single character symbols may also be used in a prefix manner as long as the expression they initiate is enclosed in parenthesis. Fixed bug in CommonColorings.colorLogoElements() involving how tilde was handled. Fixed UNDO bug in Editor; screen contents were not refreshed to display effected text. Fixed bug in Operator.toString() where it did not take into account operators with a variable number of arguments. Added menu font sizes: 24, 36, and 48 for 4k displays. Improved robustness of colorErrTxt() - now checking for negative character index. Version 0.9.37.8 ---------------- Fixed bug causing a sysErr and a misleading error message. The expression "(sum 1 procNeedingInput)" generated the sysErr(): "Parser.parseExpr: unexpected close parenthesis" and then "ERROR: Not enough inputs to sum" instead of "ERROR: Not enough inputs to procNeedingInput" Needed to move some THROTTLE code. setThrottleSleepAmt() is now part of the InterpreterManager interface. Code was moved out of Command into TGDriver and TGPlayer, both of which implement InterpreterManager. Fixed bug where a TBPromptbar did not go away when [Esc] was pressed while a promptbar existed. Bug exposed when repainting of Editor contents was optimized. Fixed bug in CommandCenter.colorText(). Added code to only color lines of text in the CommandCenter that start with the prompt sequences "? " and "> " which are input lines. Lines of text that that are output from Logo (produced with print, println, show, and type commands) are not colored. Fixed bug (oversight); MEMBER? only supported words for its first input. So, MEMBER? [1 2] [1 2 [1 2]] was illegal, but worked in UCB Logo. Fixed bug in UserDefProc. A procedure was marked as parsed before it was successfully parsed. Need to catch any parsing error (RuntimeError thrown) and reset the procedure so that parsing still needed. Added defensive code to Command.printPrintlnShow() to check for null pointer argument. In this case, it now prints "null" Improved error messages for ITEM and SETITEM when the item number input is greater than the number of elements in a collection Fixed Thread deadlock situation when an Interpreter (turtle) is busy and editor contents are changed and then focus switched out of Editor. TG would hang... Version 0.9.37.7 ---------------- Changed LOADCODE such that after inserting the file into the Editor, it automatically reinterprets its contents. This saves user from having to manually do this via Window->Editor->Interpret menu item. One more optimization to painting text in the Editor and CommandCenter - spaces are made part of any colored text to its left, if any. Fixed bug in appendColoredWord() where Color objects were compared with == instead of .equals() Fixed bug in colorLogoElements() where an expanded ColoredText[] array from appendColoredWord() was not its return value. Version 0.9.37.6 ---------------- Optimized text display in TextBuffer for the cursor [run() method] and appendChar() method, delCharAt(), and insertCharAt(). Converted arrays in Command and Operator that were used to map textual representions of Commands/Operators into their corresponding identifier numbers into Hashtables. This speed-up of access helps realtime coloring in TextBuffer. Version 0.9.37.5 ---------------- Fixed bug in FileIO.getFile() involving absolute path file specifications. Fixed bug with File->New menu item. forgot to update interpreterChangeCount when there was no need for Save? prompt for existing code in the Editor. New stuff typed into Editor was not interpretted when focus was transferred out of the Editor. Fixed bug improperly handling editorheight=xxx startup option. There were cases where the Editor would not be opened or given height requested. Fixed missing " to " in Parser error message for Too many inputs... Fixed bug where ;comments on a procedure definition's title line were not treated as such Rewrote a lot of the coloring code, moving it to the CommonColoring class. Added coloring of built-in Operators. Removed partially implemented Serializable stuff. Version 0.9.37.4 ---------------- Fixing little Java coding issues reported by FindBugs. One example was removing all finalize() methods I had now that I understand the issues associated with them. Added NOTHROTTLE Directive which turns off throttling like existing THROTTLE 0 Directive. Moved THROTTLE and NOTHROTTLE to Commands. Version 0.9.37.3 ---------------- Fixed bug in FileIO.getText(); forgot to close() reader. Modified support for keyboard input in CommandCenter and the editor (now supports square brackets on Italian keyboard). Fixed bug where EDITOR directive did not initialize the EditorNamestripe properly - name was always "Editor" even when in Emacs mode. Fixed bug where indentation level for TRACE was not restored to the left margin when a program's execution was terminated with QUIT directive (Ctrl-Q). Added code for SAVEPICTURE command. It will now write out the contents of the graphics canvas to a file in .gif, .jpg, or .png image file formats. Version 0.9.37.2 ---------------- Commited 5/13/2014 Fixed bug in CommonColorings.getDelimData() - index into the delimiter arrays wasn't being checked for max value. Fixed bug in Array.toString(); redundant square brackets were added to List elements. Fixed bug in TG.clearThrottle(); forgot to force repaint(). Fixed problems with EDIT Directive; biggest problem was that it did not set the Editor's file name. Version 0.9.37.1 ---------------- Commited 3/29/2014 Added THROTTLE directive to artificially slow down the graphics. This is useful for debugging and/or seeing what some graphical code in a program is doing. Version 0.9.37 -------------- Commited 3/10/2014 Extended support for key events in jLogo programs. KEYRELEASED and KEYTYPED procedures can now be provided, in addition to the existing KEYPRESSED procedure. They map one-to-one with the Java KeyListener counterparts. The key numbers passed to the procedures have changed for action keys. Instead of starting at 2^8, they now start at 2^16, e.g., DOWN=128 is now DOWN_ARROW=65537. Extended types of image files that may be read in as a background picture or as a shape that the turtle may take on. In addition to .bmp files, TG now can use .gif, .jpg, and .png image files. Command, Sprite, and TGCanvas source was reorganized to support release of a new version of the TurtleGraphics stuff for Java. Global symbolic constants added for font numbers. Added LS directive (DIR also recognized) for use in the CommandCenter when TG is running as an application. The asterisk wildcard is supported in DIR/LS parameter. Updated TurtleGraphics and TGPlayer so that they are based on same source code as TG. Improved algorithm which sets transparency of all white pixels between edges of Sprite pixRects and outermost non-white pixels composing the Sprite's image. Added rotation styles for LOADSHAPE Sprite images. Version 0.9.36.7 ---------------- Sprite.stamp() didn't need "throws RuntimeError" and Sprite.loadFontSizes() accessed Environment to get it's operatingSystem field. I replaced the latter with direct access to System.getProperty("os.name"). These changes were necessary to build a new TurtleGraphics package. Got rid of Sprite.loadSprite(). The Sprite class no longer maintains an array of user-supplied sprite images, now up to Command class to do this. Added new Sprite.setshape() method which takes a SpritePixels object as a parameter. This is cleaner for TurtleGraphicsWindow class (Java lessons). Version 0.9.36.6 ---------------- Commited 1/20/2014 When I removed focus change via keyboard code for applets (which wasn't working) from TG.init(), I accidently removed a couple of lines that painted subwindow focus indication (black name stripes for CommandCenter and Editor, a frame around TGCanvas. Version 0.9.36.5 ---------------- Commited 1/19/2014 Transfer of keyboard focus between subwindows is now limited to [Ctrl][Tab] for down and [Shift][Tab] or [Ctrl][Shift][Tab] for up. The [Tab] key event is now passed on to subwindows. Sorry, but still can't get focus traversal by keys working in Applet mode... Built-in shapes can now have individual minimum sizes based on what works for them. I need a BoxTurtle with width of two pixels to serve as a cursor. Added DiamondTurtle (SETSHAPE 6), with optional sentence input which may include custom width and height. Added BEEP Command. AND and OR Operators now support a variable number of inputs when they and their inputs are surrounded with parenthesis. Fixed bug in TGCanvas.keyPressed(): [Enter] and space key events were being passed to the Logo program twice - once in keyReleased() and once in keyTyped(). Fixed bug in TG.java where Workspace.clear() was not being invoked before interpreting the contents of the Editor. Fixed bug in FileIO where .jlogo extension was not appended onto a file name that had "." in the path, e.g., "..\foo" Expanded built in Logo color numbers from 16 to 32. Number Color Number Color Number Color ------ ---------- ------ ---------- ------ --------- 0 black 11 aqua 22 gold 1 blue 12 salmon 23 lightgray 2 green 13 purple 24 peru 3 cyan 14 orange 25 wheat 4 red 15 grey 26 palegreen 5 magenta 16 navy 27 lightblue 6 yellow 17 skyblue 28 khaki 7 white 18 lime 29 pink 8 brown 19 steelblue 30 lawngreen 9 light brown 20 chocolate 31 olive 10 forest 21 purple Started rounding out full KeyEvent support in TGDriver by adding keyReleased and keyTyped user-defined procedures. Still need to decide how to support them and historic keyPressed which now handles all key events. Changed HEADING Operator so that it's output is no longer necessarily rounded to the closest integer. The output now only reflects rounding to an integer if it is LogoFloat.closeEnough Fixed bugs in CommandCenter and Editor: auto-repeat was being ignored. Version 0.9.36.4 ---------------- All references to files on the BFOIT ItP website are now case independent even though it is a BSD Unix system. This effects LOADCLIP, LOADCODE, LOADPICT, LOADSHAPE Directives and Emacs commands Ctrl-x f, Ctrl-x i and WinEdit command Ctrl-o Added Ctrl-U command to the CommandCenter which clears input characters after prompt text on current input line. Added delete-word Emacs command (Esc d) to Editor. FileIO clean-up; abstraction provided is much cleaner; rewrote saving source code to a file. Version 0.9.36.3 ---------------- Added support for [command] key variations of copy/cut/paste, e.g. [command]-c for copy, ... Bug in CommandCenter: Ctrl-Q support was left out of winCtrlKey() Version 0.9.36.2 ---------------- Started to highlight erroneous text in CommandCenter that is related to popup ErrMsgs. CommandCenter had to start sending StringStreams to TGDriver (instead of Strings) so that SrcLoc stuff is available. Basically rewrote Directive.java. Removed directiveIdNums and and creation of Directive objects. New method tryDirective() which takes a StringStream as a parameter. If the first word in the stream matches a Directive identifier, whatever the action is associated with it is performed. CD Directive no longer needs backslashes in paths doubled-up. AUDIOFILES, PRINTPROCS, JLOGOFILES, and PICTFILES Directives now have an optional input which is a word that may include asterisks (*) as wildcards (match zero or more occurances of any character). Added an EDIT/EDITOR directive which opens the Editor if not already open. If a file name is given as an input, the contents of the file is LOADCODEed into the Editor. Added Emacs key combo Ctrl-x h which selects all text in the Editor, matching Ctrl-a in WinEdit. A few bugs associated with Editor mods made in 0.9.36 fixed. Version 0.9.36.1 ---------------- Fixed bug in STAMP. When performing repeated STAMPing with a variety of headings or pen colors results were not as expected. Fixed bug in text selection. The right side of the seletion was off by 1. One too many characters were selected, copied/cut. Rearranged order of coloring in JLogoEditor so that text matching the current search takes precedence over other colorings. Fixed bug in Sprite.setSpriteColor(). Was comparing Color objects for equality (==) instead of two Color object's RGBA equality. Many changes to TGHelp.txt to improve HELP. Version 0.9.36 -------------- CommandCenter and Editor now support two modes, Emacs and WinEdit. Two new Directives, coincidently named EMACS and WINEDIT allow you to switch modes. The default mode at startup is WinEdit but a new startup option, EMACS, lets you start in Emacs mode. WinEdit mode pretty much emulates the functionality available in Notepad. Emacs mode is a subset of the the real Emacs editor. SHOW Command is now compatibile with Berkeley Logo. Editor now hightlights an unmatched element of a delimiter-pair on lines. Delimiter-pairs are (), [], and {}. Delimiter-pair highlighting, like that performed in the Editor, is now also supported in CommandCenter. PASTE is now supported in CommandCenter. Filename handling now supports ".jlogo" as the default extension. Logo built-in Commands are now colored brown in the Editor. Fixed a bug in the FPUT Operator. Extended the EVALUATE Operator to handle operations that have inputs. One way is with an input that is a List. A second way is by surrounding it and its inputs with parenthesis. Improved SrcLoc identification of tokens associated with error messages. TextBuffer's array of StringBuffers now starts out at a reasonable size and can grow dynamically. It used to be a fixed size, large enough to hold an 8000 line program. Version 0.9.35.1 ---------------- Added AUDIOFILES and CD Directives. READLIST and READWORD Operators now return "null for EOF. CharInFile.readLine() changed to return null for EOF in place of an empty String. Berkeley Logo uses many empty words/lists where null is appropriate. Due to issues with error messages, handling of the "null value was modified extensively, NoValRuntimeError gone. Basically, "null is now a valid primitive Data type. Added NoLocalRuntimeError. Many improvements to error messages previously missing SrcLoc info. Version 0.9.35 -------------- Big change was how SETLABELHEIGHT works - its input is now the desired height of capital letters. Since I can't get character height information from Java, I added an algorithm including a fudge factor (ratio) of capital letter height to maxAscender data I can get from Java. It's pretty good; it's usually within a pixel of requested height if not an exact match until the requested height gets pretty big, say 50 or more. Added LABELWIDTH operator which outputs the width in pixels of the textual image of its input. The value depends on the current font context, i.e., current font (default or set with SETLABELFONT command) and label heigh (default or set with SETLABELHEIGHT command). Added SETLABELFONT command which accepts a font number input. Here are the supported fonts. Number Font Style ------ ---------- ----------- 0 Courier Plain 1 Courier Bold 2 Courier Italic 3 Courier Bold Italic 4 Sans Serif Plain 5 Sans Serif Bold 6 Sans Serif Italic 7 Sans Serif Bold Italic 8 Serif Plain 9 Serif Bold 10 Serif Italic 11 Serif Bold Italic HELP, JLOGOFILES, PICTFILES, and PRINTPROCS directives now print out in multi-column format. Having all the procedure TO lines in a program displayed in the CommandCenter while editing in the Editor is handy. Added getBounds(), getFont(), and get FontMetrics() to Console interface. Directive multi-column printing support needs this information. VERSION directive now prints OS name and its version in addition to TG's version number and the JVM's version number. mouseClicked and mouseMoved user-defined procedures are now supported with three different TO lines: no-inputs, single-input [x y], and two inputs x, y. When TG is running as an applet, LOADSHAPE will do case-independent compare of its input to all filenames in the pictfiles.txt file. If any filenames start with the input, the first matching is substituted for the input and this file is downloaded. Added RegExp constructor which included ignoreCase boolean. Whether a literal (TYPCOD_LIT match) character matches depends upon it. Default is Unix regular expression standard of case matters. Added debug code to StringStream getInstance(List list). Version 0.9.34.4 ---------------- Fix NullPointerException in Parser.parseNumber() - needed to check previousToken != null before accessing its typeCode field. I searched for similar references and found parseWord() had the same problem. Added check for two additional references in parseExpr(), in the case Token.OPEN_BRACKET and case Token.OPEN_SQUIGGLY, although I could not reproduce a NullPointerException in these cases. Lots of improvements to the contents of TGHelp.txt Changed the SourceCode interface. Removed: void loadChars( char[] chAry, int startLinNum ) Added: void loadStrings( String[] strAry, int startLinNum ) Removed JLogoEditor invocation of loadChars(). Removed TextBuffer.loadChars() replacing it with TextBuffer.loadStrings() Changed user loaded shape numbers to match user loaded clip numbers. User supplied shape numbers are now 32 - 127. Changed default sizes of arrow, ball, box, cross, and triangle turtles to be approximately the dimensions of the TurtleTurtle. Changed TG.propertyChange(PropertyChangeEvent evt) to no longer clear the graphics canvas when either the CommandCenter or the graphics gets focus and the Editor's contents had changed. Rewrote FileIO.getClip() and how FileIO.getPixRect() sets up the FileInputStream it uses. Rewrote how FileIO supports reading character files (for HELP and for loading jLogo source code). Removed two flavors of readCharFile() and added String[] charFileToSTringArray( String fileName ) Removed code in Operator that threw a RuntimeError when an Array was added to a List. Lists are allowed to contain Arrays. Version 0.9.34.3 ---------------- Major change was to introduce the new value "null which is now the initial value of declared variables (GLOBAL and LOCAL Commands) and all members of an array obtained with the ARRAY Operator. Effected were many Operators: ARRAY?, ASK, EMPTY?, EQUAL?, ITEM, LIST?, LISTTOARRAY, NUMBER?, THING, WORD? and the MAKE, OUTPUT, and SETITEM Commands. User-defined operators that try to output "null throw NoValRuntimeError, just like accessing a variable whose contents is null. Creating an Array with no members is now legal. Joshua Bloch prefers zero member Arrays than use of a null reference to indicate an empty array. REPEAT (COUNT :ary) [ ... ] when the array has no members works properly. SourceVarRef is gone; VarRef exists now only for references to locals that can be determined at Parser time. I should look into eliminating it now that its value is so limited. MULTIKEY_DELAY increased to 1200 milliseconds. ARRAYTOLIST ignores null members; they are not in the output List. All use of the word "element" regarding Arrays changed to "member" for consistency. Started preping for adding Word.getInstance(...) methods and replacing most if not all use of Word constructors with getInstance() invocations. Interpreter now catches OutOfMemoryError and aborts execution. In TextBuffer.paint(), added check for null StringBuffer reference in buffer[] before invoking toString() on it. VERSION Directive now prints JVM version number in addition to TG version. Fixed bug in Parser.setHasOutput() where RuntimeError was not thrown if OUTPUT Command was not inside a procedure definition. Added SrcLoc info to both this error and similar error detected in Parser.setHasStop() Version 0.9.34.2 ---------------- Improved error messages displayed by SETPIXELS. An EMPTY? member in the pixel array input to SETPIXELS no longer is an error, it is assumed to be a transparent pixel (alpha == 0). Increased Editor.MULTIKEY_DELAY to a second. In TGHelp.txt, all use of "element" was changed to "member" for consistency. Started adding "See also: xxx" lines to what's printed. Version 0.9.34.1 ---------------- Added detection of applet access exceptions in CharInFile and CharOutFile. Added LOADCLIP command and (ARRAYTOLIST array beginIndex count) support. Fixed bug where '?' was not allowed as last character of an identifier.