<h2>Changes in bsh-1.0</h2>
<em>Not necessarily in order of importantce</em>
<li>Added generalized support for scripts implementing interfaces (e.g.
arbitrary event listeners).
This uses the important new JDK1.3 reflection proxy mechanism to manufacture
a proxy interface at run time. No code generation is necessary!
<li>Added support to the cast operation to use the new mechanism.
<li>Added support for automatic conversion to interface on method selection.
e.g. if you attempt to pass a bsh scripted object as a method argument
where the method signature calls for an interface an automatic cast to
the appropriate interface type will be attempted.
<li>Added a magic method invoke(method,args) which can be used to
handle method invocations on undefined interface methods in bsh objects.
This takes the place of "dummy" adapters; allowing a script to ignore one
or more methods of an interface that it is implementing.
<em>Note: one special case - direct invocations within scope
(e.g. command invocations) are not currently sent to invoke.</em>
<li> Added startup file (.rc file) support.
Bsh will source the file "user.home"/.bshrc upon startup.
This defaults to C:\Windows under win98 and $HOME under Unix.
(can the home be set with an env var under Win? "home" doesn't seem to do it).
<li>Added arguments to file invocation on command line.
java bsh.Interpreter MyClass foo bar
Args are accessible through the root bsh object: String  bsh.args
<li>Enhancements to JConsole submitted by Daniel Leuck;
Added color and image support, fixed several bugs.
<li>Added support for inner classes. This should all work as expected, but
it's new so let me know if you find weirdness.
<li>Added support for inner classes to import statement.
<li>Changed the way eval()/source() handle script errors. Instead of
returning the error object as a value it is now wrapped up with some context
and rethrown as an EvalError. So you can simply catch the error with a normal
try/catch block if you want to. Previously errors in sourced/eval'd files
were being squelched. This was bad. Note: exceptions generated by the
script or through code called by the script are thrown as TargetErrors (a
subclass of EvalError) which can also be caught and examined.
<li>Improved error reporting in many areas.
Fixed really annoying error reporting bug that squelched target error
info in sourced files (and commands).
<li>Improved bsh cast operation so that it throws standard ClassCastException
for invalid cast. You can now guard against them with the ordinary try/catch
in a bsh script.
<li>Modified the command line portion of the grammar to accept arbitrary
expressions. e.g. you can type ``5*2;'' or ``foo instanceof Foo;'' on the
command line now without any enclosing parens.
(Of course you won't see anything unless you're using the show() option).
<li>Removed the old AWT version of the GUI console. If you need it you can
get it on the web site separately. I may reconsider this.
<li>Removed the console() command which was primarily for the old AWT console.
<li>Modified the browseClass() command to take an object instead of a string
class name. Now you can simple say browseClass( someObject ) and pop up
the class browser to the correct place. Special hack: If the specified object
is a Class it will use the class. This will all probably be replaced by
a general browse() method for the upcoming object inspector.
<li>Changed the return type of the frame() command to allow it to return an
internal frame when desktop is active. Frame will now do the correct thing
whether the desktop is up or not.
<li>Rebuilt the distribution with JavaCC / JJTree version 1.1.
Haven't notice any difference yet.
<li>Fixed the 'for' scoping bug - See docs on for scoping for clarification.
Previously variables declared within the for-init section were leaking out
into the outer namespace.
<li>Fixed a bug in which tokenizer errors would cause the interpreter to hang
or exit. They are now handled like other parsing errors. In the future we
may want to break them out so that they can be handled separately from
<li>Added missing += form of string concatenation.
<li>Incorporated a patch and test suite case from Roger Bolsius that corrects
some of the package / hidden reflected class access. Previously the code did
not handle the more difficult cases.
<li>Incorporated a patch from Mike Woolley which works around JDK bug 4071281
(EOF problem) under Windows JDK v1.1.
<li>Fixed most of the bugs in server mode. Run the server pair (httpd /
sessiond) using the server( port ) command. Then you can telnet to port+1
or attach your web browser to port. Note that the web browser must support
swing to run the remote JConsole. We could supply the AWTConsole back for
compatability with old browsers... but I'd like to move on.
<li>Internall trivia - changed the prefix of the names of all of the parser
node classes from AST to BSH.
<li>Fixed a bug which caused ClassCastException during (ironically) a bsh
<li>Improved the test harness slightly and added a number of new files to the
test suite for all of the new features. Please send more test cases for
the test suite!
<li>Internal change: Simplified the code that determines array base types.
<li> Fixed bug where special characters on input (e.g. control charcters ^D)
would cause the tokenizer to loop on errors. Non printable chars are now
skipped as white space.
<li>Added the missing do-while statement
<li>Internal: Tightened up the code a bit by combining the BSH node conditional
evaluation into one place.
<li>Fixed some race conditions in the JConsole.
Fixed multi-writer console problems.
<li>Fixed order of evaluation bugs: classes now always first, then bsh vars.
Note: this may not always be desireable. e.g. if you have a class named
"x" in your path (violating the common naming conventions) then you can't
use a variable of name 'x' in your scripts. Conversely though, it prevents
one from doing "Integer = 5;" and shadowing the java.lang.Integer class
with a variable name. Any thoughts on this?
<li>Corrected handling of the bsh root object.
<li>Added a menu item to console to redirect stdin/stdout/stderr.
If you close the console they are restored to the original System.in,out,err.