head	1.1;
branch	1.1.1;
access;
symbols
	rel_1_1_a1:1.1.1.1
	tcljava-1-1-a1:1.1.1.1
	tcljava:1.1.1;
locks; strict;
comment	@# @;


1.1
date	98.10.14.21.09.23;	author cvsadmin;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	98.10.14.21.09.23;	author cvsadmin;	state Exp;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@README
RCS: @@(#) $Id$


Abstract
--------

      This demo shows how to embed a Tcl console in a Java applet.

Why Bother?
-----------

      By adding a Tcl console to the applet, we can dynamically
      change the functionality of applet's widgets.

Running The Demo
----------------

      This demo uses Java Threads.  Because Java Threads are not yet
      supported by Tcl Blend, this demo only runs on Jacl.  The
      following 3 steps show you how to run the demo:

      A) cd to the directory containing this README file.

      B) add . to your CLASSPATH environment variable.

      C) To begin the demo, type "appletviewer pyramid.html".

      The Java applet is comprised of three components: 
	1) a drawing of a partially built pyramid.
  	2) buttons which allow the user to build and remove blocks from the
           drawing, and
  	3) a console which runs a Tcl interpreter.  The Tcl interpreter is
           extended with two new commands "build" and "remove" which allow
           the user to manipulate the pyramid in the same way as with the
           buttons.

      How do we change functionality of the applet's widgets dynamically?
      In the console, we can redefine the Tcl interpreter's "build" and
      "remove" commands.  If you look at the BuildButtonListener class in
      "Pyramid.java", you will see that the button is hardcoded to invoke
      the Pyramid's buildBlock() method.  We cannot change the behavior of
      this method from within Tcl.  However, if you look at the
      RemoveButtonListener class in "Pyramid.java", you will see that this
      button causes the "remove" command to be evaluated in the Tcl
      interpreter, thereby rendering its behavior dynamically changeable.
      Try typing the Tcl code in "changeDefs.tcl" into the applet console,
      and see the interesting results.  Although you are running an applet,
      the appletviewer tool allows you to source the file, so you can save
      yourself some typing (neither cutting nor pasting works in the
      console) by typing "source changeDefs.tcl".

Source Files
------------

    * Pyramid.java
    * AppletConsole.java
    * ConsoleKeyListener.java
    * ConsoleMouseListener.java
    * changeDefs.tcl

@


1.1.1.1
log
@Original checking for TclJava 1.1a1
@
text
@@
