Menu

#256 uplevel and itcl still not compatible

4.0*
closed-fixed
None
5
2014-09-13
2014-09-09
David
No

255 was fixed, but this nearly identical bug remains:

package require -exact Itcl 4.0.1

proc do_uplevel { body } {
uplevel 1 $body
}

itcl::class TestClass {
constructor {} {}

public method api-call {}
private method internal-helper {}
public variable property "value"

}

proc ::testclass { pathName args } {
uplevel TestClass $pathName $args
}

itcl::body TestClass::internal-helper {} {
puts "TestClass::internal-helper"
puts "this won't work:"
do_uplevel {
puts [cget -property]
}
}

itcl::body TestClass::api-call {} {
puts "TestClass::api-call"
internal-helper
}

set tc [::testclass .]
$tc api-call

Discussion

  • Arnulf Wiedemann

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

    Fixed in fossil respository trunk. Will go into next version. I hope this fix works for any number of uplevels. :)

     

Log in to post a comment.