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

History Of Ticket 405084ffffffffff

Artifacts Associated With Ticket 405084ffffffffff

  1. Ticket change [8521fe6f31] (rid 131269) by petasis on 2001-03-01 06:46:11:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Incompatibility between "trace add variable" and "trace variable".
      
      According to the "trace" manual, "trace variable" is equivelant to 
      "trace add variable". But:
      
      1) They don't give the same error messages.
      % trace variable
      wrong # args: should be "trace variable name ops command"
      % trace add variable
      wrong # args: should be "trace add variable name opList command"
      
      2) According to the manual, the following should work (and works):
      proc tracecall {name1 name2 op} {
        puts "name1=\"$name1\", name2=\"$name2\", op=\"$op\""
      }
      trace add variable x write tracecall
      set x 1
      
      > name1="x", name2="", op="write"
      
      But trying:
      
      trace variable y write tracecall
      > bad operations "write": should be one or more of rwua
      
      So, "trace variable" accepts only abbreviations?
      
      3) Finally, the manual info about "trace add variable" is incomplete, since
      it does not describe the operation "read" which exists and is referenced 
      in the descussion about the parameters passed to the "command" parameter
      of the "trace add variable".
      
    4. foundin initialized to: "obsolete: 8.4a2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "petasis"
    9. subsystem initialized to: "18. Commands M-Z"
    10. title initialized to: "Incompatibility in "trace" parameters"
    11. type initialized to: "Bug"
  2. Ticket change [344ebc638a] (rid 106742) by petasis on 2001-03-02 13:42:29:

    1. closedate changed to: "2001-03-02T06:42:29"
    2. closer changed to: "petasis"
    3. icomment:
      Logged In: YES 
      user_id=92283
      
      As Jeff Hobbs has pointed, "trace variable" has a different, older
      syntax and is deprecated...
      
      > According to the man page, "trace variable" is equivelant to
      > "trace add variable" ...
      
      Correct...
      
      > ... and should accept the same parameters, the ones
      > described in the man page.
      
      Buzz!  Not correct.  I do not see anywhere in the docs that the same
      params are accepted.  It in fact expressly notes in the docs that there
      is a distinct mapping:
      
        These subcommands are deprecated and will likely be removed in a future
        version of Tcl.  They use an older syntax in which array, read, write,
        unset are replaced by a, r, w and u respectively, and the ops argument
        is not a list, but simply a string concatenation of the operations,
        such as rwua.
      
      > ways *do not* accept the same arguments, with "trace variable" being more
      > powerful than "trace add variable". Is this a known bug?
      
      'trace add var' is the newer and more powerful syntax, as noted in
      the docs.
      
      
    4. login: "petasis"
    5. mimetype: "text/plain"
    6. status changed to: "Deleted"
    7. title changed to: "Incompatibility in "trace" parameters"
    8. username: "petasis"