Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cf1a85c0ce9bf054434bc67f8bc470aba61d202d
Ticket: 707104ffffffffffffffffffffffffffffffffff
[interp alias] overwrites [rename]d alias
User & Date: vincentdarley on 2003-03-21 17:29:58
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    Yup, I'm now using this, which copes with command 
    traces too:
    
    proc hook::_safeRename {origName newName} {
        set alias [interp alias {} $origName]
        if {[string length $alias]} {
    set trace [trace info command $origName]
    rename $origName $newName
    # Must re-create the alias, and the trace
    interp alias {} $newName {} $alias
    foreach t $trace {
                       eval [list [list trace add command 
    $newName]] $t
    }
        } else {
    rename $origName $newName
        }
    }
    
    I'm glad Donal agrees --- using command traces on 
    aliases with this limitation is pretty hopeless 
    (fortunately there seems to be the above workaround, 
    but I've not used it enough to know whether I'll see 
    further problems too).
    
    Since there seems to be some consensus, I'm moving 
    the priority back to normal.
    
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. priority changed to: "5 Medium"
  5. username: "vincentdarley"