Tk Source Code

View Ticket
Login
Ticket UUID: c2290bd04bd915d0d2e99256a2f14016fb05708a
Title: Iwidgets incompatible with auto_load - produces command error.
Type: Bug Version: 8.6.4
Submitter: anonymous Created on: 2017-01-29 19:48:49
Subsystem: 99. Other Assigned To: nobody
Priority: 5 Medium Severity: Severe
Status: Open Last Modified: 2017-02-01 21:23:43
Resolution: None Closed By: nobody
    Closed on:
Description:
Commands imported from a proc accessed using the library auto load capability result in a command error when they are executed.

This occurs only when the command "package require Iwidgets" is included in a scripts.

The attached contains two scripts.
Save them separately. Use auto_mkindex to create the index used by the auto load facility.

Run the dst.tcl script with and without the package require statement.

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]"
}

run auto_mkindex referencing the directory where you store them

run dst.tcl

expected:
=> alpha beta charlie

received:
invalid command name "a" while executing ...
User Comments: fvogel added on 2017-02-01 21:23:43:

Same ticket in the Tcl tracker.


dgp added on 2017-01-30 20:28:29:
It appears that the Itcl package is somehow
damaging or interfering with the operations
of [::auto_import].  I'll file an Itcl bug
once I narrow down a better test case.

fvogel added on 2017-01-29 20:12:50:
I don't think here is the right tracker for this issue, but I fail at directing you to the Iwidgets tracker. Or perhaps rather try the Tcl tracker.