Skip to content
Tcl Source Code History Of Ticket 1746143fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1746143fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1746143fffffffffffffffffffffffffffffffff

  1. Ticket change [e03b9c7fdd] (rid 115150) by msofer on 2007-07-01 19:17:56:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Notice that traces set during unset traces survive the [unset] - which is IMO more than what the man page promises with "Traces are not disabled during unset traces, so if an unset trace command creates a new trace and accesses the variable, the trace will be invoked". Bug or not? Should the variable always be completely gone after [unset]?
      
      Witness:
      
      % trace add variable x unset {trace add variable ::x unset {puts foo;#} ;#}
      % trace info variable x
      {unset {trace add variable ::x unset {puts foo;#} ;#}}
      % set x 1; unset x
      % trace info variable x
      {unset {puts foo;#}}
      
      Interesting effect: unsetting a var in a namespace does not guarantee that later upvars go to the global namesake.
      
      % set x 1
      1
      % namespace eval a {
      set ::a::x 2
      trace add variable x unset {trace add variable x unset {puts foo;#} ;#}
      unset x
      upvar 0 x y
      set y 3
      }
      3
      % set x
      1
      % set a::x
      3
      % unset a::y
      foo
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "msofer"
    10. subsystem initialized to: "07. Variables"
    11. title initialized to: "bug? Unset may not completely remove the variable"
    12. type initialized to: "Bug"
  2. Ticket change [196d469c73] (rid 122804) by dgp on 2007-07-02 23:18:43:

    1. assignee changed to: "msofer"
    2. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      I don't think you can know without
      trying it and waiting to see who
      complains.
      
      What's the test suite think?
      
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  3. Ticket change [c7a918a5e3] (rid 121970) by jenglish on 2007-07-06 04:58:16:

    1. icomment:
      Logged In: YES 
      user_id=68433
      Originator: NO
      
      Tk relies on this behavior: whenever a widget has a linked -variable or -textvariable, it attaches a write+unset trace that reestablishes itself whenever it's called with TCL_TRACE_DESTROYED.
      
      If traces added during an unset trace did not survive the [unset], it would break quite a lot of Tk and other megawidget packages that work the same way.
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  4. Ticket change [0b099b28ed] (rid 113918) by msofer on 2007-07-06 05:01:27:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: YES
      
      Thanks! So this is a feature not a bug, it should be doc'ed and that's it.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. resolution changed to: "Invalid"
    5. username: "msofer"
  5. Ticket change [325de769ed] (rid 93602) by msofer on 2007-07-06 05:58:18:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: YES
      
      What does 'break' mean - error or segfault? Because namespace deletion does remove everything: if segfault, that is not good (TM)
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  6. Ticket change [7fcc7a9381] (rid 97621) by jenglish on 2007-07-06 06:31:41:

    1. icomment:
      Logged In: YES 
      user_id=68433
      Originator: NO
      
      "breaks" as in "the widget is in an inconsistent state", specifically that the widget value is no longer linked its -variable's value.
      
      Don't know what happens when the -variable's namespace is deleted -- my best guess is that at worst it just leads to inconsistent behavior (of course that depends on how the widget in question manages linked -variables...)
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  7. Ticket change [c76cb1c0a4] (rid 121930) by jenglish on 2007-07-06 06:45:34:

    1. icomment:
      Logged In: YES 
      user_id=68433
      Originator: NO
      
      Did a quick spot-check of a few widgets: the most common behavior is that the widget raises errors "Can't set {whatever}: parent namespace doesn't exist" at various times (generally whenever the widget value changes; sometimes more frequently, sometimes not at all) until such time as the parent namespace is recreated.  Then the variable will reappear, but without the write trace; so changes to the widget are reflected in the variable, but not vice versa.
      
      No core dumps encountered so far (and, looking at the way linked variables are commonly implemented, I wouldn't expect any.) 
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  8. Ticket change [dc14e7a01d] (rid 108067) by msofer on 2007-09-13 07:49:18:

    1. priority changed to: "8"
  9. Ticket change [3cdd18cfeb] (rid 120984) by msofer on 2008-07-30 06:32:22:

    1. priority changed to: "5 Medium"
  10. Ticket change [1d60d195d4] (rid 90792) by msofer on 2009-05-10 09:57:16:

    1. closedate changed to: "2009-05-10T02:57:16"
    2. closer changed to: "msofer"
    3. icomment:
      
      
      allow_comments - 1
      
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "msofer"