TclBlend: Blending Tcl and Java

By Scott Stanton

Dr. Dobb's Journal February 1998

(a)
set obj1 [java::new Simple "a value"]
(b)
set obj1 [java::new Simple "another value"]
puts "The contents of the Simple object are: [$obj1 toString]"

Example 1: (a) Script creates a new instance of the Simple class; (b) how a script creates an object.

Back to Article


Copyright © 1998, Dr. Dobb's Journal