Tcl Source Code

View Ticket
Login
Ticket UUID: c1c4daae0e9821d75597754c1887f435db6b9152
Title: may be error in "namespace eval"
Type: Bug Created on: 2022-10-16 20:25:17
Submitter: anonymous Assigned to: nobody
Subsystem: 21. [namespace] Severity: Severe
Priority: 5 Medium Last modified: 2022-10-16 20:25:17
Status: Open Closed by: nobody
Resolution: None Closed on:
Version:
Description:
########################################################
# It may be error in "namespace eval".
# Why such output??????????????
########################################################
if { [info exists ::tk_version] } { console show; console eval { font configure TkConsoleFont -size 20 } }

set tli {::auto_mkindex_parser ::mk ::oo::InfoObject ::oo::Obj1 
         ::pkg ::tcl ::tcl::Pkg ::tcl::array ::tcl::dict ::tcl::file 
         ::ttk::treeview ::vfs ::vfs::mk4 ::zlib }
foreach ns $tli {
  set str { set tli [info vars];   set tli [lmap x $tli { namespace which -variable $x }] }
  if { [catch { namespace eval $ns $str} res] } {
    puts "=== error in $ns, $res"
  } 
}
########################################################
# Output:
#=== error in ::mk, view index is out of range
#=== error in ::oo::InfoObject, wrong # args: should be "namespace objName"
#=== error in ::tcl::array, can't set "tli(tcl_rcFileName)": variable isn't array
#=== error in ::tcl::dict, missing value to go with key
########################################################