Overview
| Artifact ID: | 28c0b1b9908ef4f7f9758b7e6cd69f37ebd18b45 |
|---|---|
| Ticket: | ba79c2f0ce408c09c8967eb037503251c4b525ac
Use of Itcl with auto load and namespace import result in command errors |
| User & Date: | anonymous on 2017-01-30 20:02:52 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Any command imported (namespace import) from a script that has been auto_loaded fails if used in conjunction with the Iwidgets package. This is true for 8.5 and 8.6 Consider the following two procs: src.tcl -------------------------------------- namespace eval src { proc a {} {return "alpha"} proc b {} {return "beta"} proc etc {} {return "..."} namespace export a b } dst.tcl ------------------------------------------- package require Iwidgets lappend ::auto_path [file dirname [info script]] puts $::auto_path namespace eval dst { namespace import ::src::* proc c {} {return "Charlie"} puts "[a] [b] [c]" } use mk to create a tcl index and run dst. The result "a" is an invalid command. Next: comment the package require. => alpha beta charlie Now, consider the mods to dst.tcl - namespace import commented. dst.tcl ---------------------------------- package require Iwidgets lappend ::auto_path [file dirname [info script]] puts $::auto_path namespace eval dst { #namespace import ::src::* proc c {} {return "Charlie"} puts "[::src::a] [::src::b] [c]" } => alpha beta charlie - foundin changed to: "8.6.4"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "96d40012292bbe2f33abb1ebc8a4a02fc9de73ff"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "38. Init - Library - Autoload"
- title changed to:
Use of Iwidgets with auto load and namespace import result in command errors
- type changed to: "Bug"