[tcljava-dev] Support for Tcl 8.6
Brought to you by:
mdejong
|
From: Justin M W. <wo...@mc...> - 2014-12-18 19:29:47
|
Hi
I am trying to get basic calls from Tcl to Java working with recent
Tcl and Java. I was able to make some minor changes to get things close
to working but am stumped with the issue pasted below. Does anyone have
a hint why TclBlend would stop working inside a Tcl for loop?
Thanks!
package require java
set s [ java::new String "STRING" ]
puts "s: $s"
puts [ info commands ]
set i 2
puts "charAt: [ $s charAt $i ]"
puts "charAt: [ $s charAt $i ]"
if true {puts [ $s charAt $i ] }
for { set i 0 } { $i < 1 } { incr i } { puts [ $s charAt $i ] }
results in:
javaInterp.c: interp: 0xa0fd60 createCommand: java::new
javaInterp.c: interp: 0xa0fd60 createCommand: java0x1
s: java0x1
... java0x1 ...
TCLBLEND_DEBUG: JavaCmdProc(java0x1)
charAt: R
TCLBLEND_DEBUG: JavaCmdProc(java0x1)
charAt: R
TCLBLEND_DEBUG: JavaCmdProc(java0x1)
R
invalid command name "java0x1"
while executing
"$s charAt $i "
("for" body line 2)
invoked from within
"for { set i 0 } { $i < 1 } { incr i } {
puts [ $s charAt $i ]
}"
--
Justin M Wozniak
|