Menu

#244 Object context under [uplevel] not found

4.0*
closed-fixed
None
2
2014-02-10
2013-05-10
No

In Itcl 3.4 working as expected, throws an error in Itcl 4.0:

puts tcl[info patchlevel]
puts itcl[package require Itcl]

proc foo {body} {
  uplevel $body
}

itcl::class A {
  method do {body} {foo $body}
  method do2 {} {puts done}
}

[A #auto] do {
  puts "I'm $this"
  do2
}

Output:

tcl8.6.0
itcl4.0.0
I'm ::a0
ItclObjectCmd cannot get context object (NULL)
    while executing
"do2"
    ("uplevel" body line 3)
    invoked from within
"uplevel $body"
    (procedure "foo" line 2)
    invoked from within
"foo $body"
    (object "::a0" method "::A::do" body line 1)
    invoked from within
"[A #auto] do {
  puts "I'm $this"
  do2
}"
    (file "./test8.6" line 19)

Regards Michael

Discussion

  • Arnulf Wiedemann

    • assigned_to: Arnulf Wiedemann
     
  • Arnulf Wiedemann

    • status: open --> closed-fixed
     
  • Arnulf Wiedemann

    fixed in trunk, will go into version 4.0.1

     

Log in to post a comment.