Artifacts Associated With Ticket 1746143fffffffffffffffffffffffffffffffff
Ticket change [e03b9c7fdd] (rid 115150) by msofer on 2007-07-01 19:17:56:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "07. Variables"
- title initialized to: "bug? Unset may not completely remove the variable"
- type initialized to: "Bug"
Ticket change [196d469c73] (rid 122804) by dgp on 2007-07-02 23:18:43:
- assignee changed to: "msofer"
- 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?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [c7a918a5e3] (rid 121970) by jenglish on 2007-07-06 04:58:16:
- 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.
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [0b099b28ed] (rid 113918) by msofer on 2007-07-06 05:01:27:
- 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.
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- username: "msofer"
- icomment:
Ticket change [325de769ed] (rid 93602) by msofer on 2007-07-06 05:58:18:
- 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)
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [7fcc7a9381] (rid 97621) by jenglish on 2007-07-06 06:31:41:
- 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...)
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [c76cb1c0a4] (rid 121930) by jenglish on 2007-07-06 06:45:34:
- 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.) - login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [dc14e7a01d] (rid 108067) by msofer on 2007-09-13 07:49:18:
- priority changed to: "8"
Ticket change [3cdd18cfeb] (rid 120984) by msofer on 2008-07-30 06:32:22:
- priority changed to: "5 Medium"
Ticket change [1d60d195d4] (rid 90792) by msofer on 2009-05-10 09:57:16:
- closedate changed to: "2009-05-10T02:57:16"
- closer changed to: "msofer"
- icomment:
allow_comments - 1
- login: "msofer"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "msofer"