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

History Of Ticket 604226ffffffffff

Artifacts Associated With Ticket 604226ffffffffff

  1. Ticket change [ae138cf721] (rid 101574) by dgp on 2002-09-03 22:31:37:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      % namespace eval a variable x
      % namespace eval b variable ::a::x
      % set a::x 1
      1
      % info exists b::x
      0
      
      
    4. foundin initialized to: "obsolete: 8.4.0"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "[variable] link to non-existent var"
    11. type initialized to: "RFE"
  2. Ticket change [d4a9836dd2] (rid 123489) by dgp on 2002-09-04 06:03:54:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      If this is not a bug, it's definitely a place to
      clarify the docs.  Related behavior:
      
      % namespace eval a variable x 1
      % namespace eval b variable ::a::x
      % puts $b::x
      can't read "b::x": no such variable
      % namespace eval b {
          variable ::a::x
          puts $x
      }
      can't read "x": no such variable
      % proc b::foo {} {
          variable ::a::x
          puts $x
      }
      % b::foo
      1
      
      Different behavior of [variable] within
      a proc compared to within a [namespace eval]
      needs either correction or more explicit documentation.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [dcf13d9214] (rid 114573) by msofer on 2004-03-28 07:20:57:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=148712
      
      Don: care to re-read variable.n? That is actually the
      documented behaviour, except that the docs are not too
      explicit about what happens with varnames with :: within
      procs ...
      The problem is: you (and I, and maybe everybody else ...)
      expect 'variable' to create a local linked variable even
      when not in a proc. But that is not what is promised, ie: it
      is not true that
         variable ::a::x
      is equivalent to
         upvar 0 ::a::x x
      Apparently 'variable' was born to correct for the weird
      lookup rules we have? 
      So: what do we do? RFE/TIP? Leave as is?
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. resolution changed to: "Invalid"
    6. username: "msofer"
  4. Ticket change [b142fdb6a8] (rid 98120) by dgp on 2004-03-29 23:10:49:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I tend to think this is a mis-feature.
      I accept I may be missing something
      important, yet subtle.  I'd like to see
      a TIP propsing the addition of setting
      up namespace -> namespace variable
      links by [variable] when not within a
      proc.
      
      If in fact, that is a bad idea, then some
      of the examples in this report could
      be incorporated into variable.n to
      more explicitly demonstrate the difference.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [6c57049cb8] (rid 128487) by dgp on 2004-03-29 23:11:21:

    1. assignee changed to: "msofer"
  6. Ticket change [3869f132e7] (rid 112205) by msofer on 2004-03-29 23:29:20:

    1. foundin changed to: "None"
    2. resolution changed to: "None"
    3. subsystem changed to: "None"
  7. Ticket change [c0cdf80b8a] (rid 102476) by msofer on 2004-03-29 23:29:21:

    1. assignee changed to: "nobody"
    2. icomment:
      Logged In: YES 
      user_id=148712
      
      Reclassifying then as RFE. The request is that, whenever
      [variable] addresses a namespace variable in a different
      namespace, it also creates a local link. In code, that
      whenever $name is a qualified variable name,
         variable $name $val
      be equivalent to
         set lname [namespace tail $name]
         upvar 0 $name $lname
         set $lname $val
      
      This would require a TIP.
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. title changed to: "[variable] should always create a link"
    6. username: "msofer"
  8. Ticket change [662a652196] (rid 102656) by dkf on 2004-03-30 15:30:44:

    1. assignee changed to: "msofer"
    2. subsystem changed to: "07. Variables"
  9. Ticket change [0178ce22a5] (rid 119489) by msofer on 2006-09-30 00:46:41:

    1. priority changed to: "8"
  10. Ticket change [d6949d8c04] (rid 123829) by msofer on 2006-10-03 05:56:53:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Uh ... not nice, [variable] is not even really a noop:
      
      % namespace eval a variable x
      % namespace eval b variable ::a::x 1
      % set a::x
      1
      % set b::x
      can't read "b::x": no such variable
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  11. Ticket change [5c959e450c] (rid 115333) by msofer on 2006-10-31 02:36:43:

    1. closedate changed to: "2006-10-30T19:36:43"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      We isunderstood the purpose and/or docs of [variable].
      Looking at namespace-old.test, I see that the usage there
      (and, from the comments, possibly an idiom in itcl) really
      requires the current behaviour outside of proc bodies.
      
      Consider test namespace-old.6.16 - to reduce headaches,
      notice that
        - there are no linked variables there
        - $trigger has been last defined in test 6.12, and is
             {set test_ns_cache_var}
        - $trigger2 has been last defined in test 6.15 and is
             {set test_ns_cache2::test_ns_cache_var}
      
      The test body is
      
       variable test_ns_cache1::test_ns_cache2::test_ns_cache_var
      "blah"
       list [namespace eval test_ns_cache1 $trigger2] \
            [namespace eval test_ns_cache1::test_ns_cache2 $trigger]
      
      Here [variable] is being used to set the value of the variable
      
         ::test_ns_cache1::test_ns_cache2::test_ns_cache_var
      
      from the global space, but without a fully qualified name
      (why?). If a variable ::test_ns_cache_var were created to
      point to it, all manner of nastyness could ensue: a new
      GLOBAL variable that may break whatever code relies on the
      second lookup path, and wasted resources as the programmer
      never expected that new variable to be created.
      
      In order to link variables, use [upvar] or [namespace upvar].
      
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Rejected"
    7. status changed to: "Pending"
    8. username: "msofer"
  12. Ticket change [f7c1019e2f] (rid 91424) by sf-robot on 2006-11-14 10:20:11:

    1. closedate changed to: "2006-11-14T03:20:11"
    2. closer changed to: "sf-robot"
    3. icomment:
      Logged In: YES 
      user_id=1312539
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"