Skip to content
Tcl Source Code History Of Ticket 651271ffffffffff
Login

History Of Ticket 651271ffffffffff

Artifacts Associated With Ticket 651271ffffffffff

  1. Ticket change [12b248242b] (rid 124089) by nobody on 2002-12-10 04:37:56:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The new "trace add command" either has a bug or isn't
      very useful,
      one or the other.  Consider this example:
      
      proc foo {} {puts "Foo!"}
      
      proc tracer {old new op} {
          puts "traced $old $new $op"
       }
      
      trace add command foo rename tracer
      
      namespace eval my_ns { rename foo bar }
      
      This outputs
      
      traced foo bar rename
      
      Now, in fact, command ::foo is being renamed ::my_ns::bar.
      If I'm really using this trace for anything but debugging,
      I need to know that.  So how do I find out?  My first
      thought
      was this, using "namespace which":
      
      proc tracer {old new op} {
          set uold [uplevel namespace which -command $old]
              set unew [uplevel namespace which -command $new]
      
          puts "traced $old=$uold $new=$unew"
      }
      
      I was hoping that running the same case as above, I'd get
      this output:
      
      traced foo=::foo bar=::my_ns::bar
      
      Instead, I got
      
      trace foo=::my_ns::bar bar=::my_ns::bar
      
      This isn't entirely unreasonable; it simply means that
      that the command has already been renamed when "tracer"
      is called.  In a way, it's surprising that I get a
      result for "foo" at all.
      
      I finally found a workaround...but gosh, I shouldn't
      have to do that 
      much work.  The "rename" command obviously has to
      qualify the
      proc names to do its job; it seems completely unreasonable
      that it doesn't pass that information along to the
      callback.
      
      Will Duquette
      
    4. foundin initialized to: "obsolete: 8.4.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "18. Commands M-Z"
    10. title initialized to: "trace add command doesn't qualify names"
    11. type initialized to: "Bug"
  2. Ticket change [b6a8548853] (rid 125460) by dkf on 2002-12-10 18:33:01:

    1. assignee changed to: "kennykb"
  3. Add attachment "651271.patch" [f9c6b8557e] (rid 91753) by kennykb on 2003-02-02 09:36:35.

  4. Ticket change [170cf8c973] (rid 124813) by kennykb on 2003-02-02 09:36:35:

    1. icomment:
      
      
      File Added - 41281: 651271.patch
      
      Logged In: YES 
      user_id=99768
      
      I *do* wish we'd found this in beta.  I personally think that
      this is a small (and beneficial) enough change that we
      can put it in a patch release, but I want to talk this over
      with a couple of other TCT members before I commit.
      
      In the meantime, the attached patch fixes the problem, and
      updates the test suite to (a) conform with the new results,
      and (b) test for your problem case.
      
      Thanks for pointing this one out.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. resolution changed to: "Accepted"
    5. username: "kennykb"
  5. Ticket change [4398b85a54] (rid 116587) by kennykb on 2003-02-04 03:26:11:

    1. closedate changed to: "2003-02-03T20:26:11"
    2. closer changed to: "kennykb"
    3. icomment:
      Logged In: YES 
      user_id=99768
      
      After talking things over with Jeff, Don, and Donal, the consensus was
      that the risk of breaking anything dependent on the existing behavior
      is less than that of leaving the bug unfixed. So I committed the
      changes.
      
      
    4. login: "kennykb"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "kennykb"