Callbacks (1)
How do you get Java to evaluate Tcl code?
- Call the eval method of an Interp object
- Use the Notifier mechanism – thread-safe!
Example: call Tcl every five button-presses
public class TclButton extends java.awt.Button { Interp tclInterp; String tclScript; int count = 5; ...