Re: [TCLCORE] command delete trace expectations
by Joe English other posts by this author
Sep 30 2003 7:23PM messages near this date
Re: [TCLCORE] command delete trace expectations
|
Re: [TCLCORE] command delete trace expectations
Vince Darley wrote:
> On Mon, 29 Sep 2003 dgp@[...].gov wrote:
> > > During a command delete trace, the traced command still exists,
> > > but will be deleted following the trace, and the trace can't do
> > > anything to stop it.
> > In a message off the list, Will Duquette tells me that the Snit
> > package is a user of command delete traces that depends on the
> > command continuing to exist when the trace is handled.
>
> Oh, I was thinking you were proposing changing the second part of the
> above: that a trace "can't do anything to stop it". To bring that inline
> with variable traces (where the trace can throw an error to stop an
> 'unset') is what my comments referred to.
>
> I believe I may have code that assumes the command still exists during the
> trace, but I don't have any that assumes the trace can't stop the delete.
Tk does. When a widget is destroyed, Tk deletes the
associated widget command. If for some reason the command
doesn't actually get deleted, All Hell Breaks Loose.
Another potential problem: most widget implementations
do not account for the fact that Tcl_DeleteCommandFromToken()
can (now) reenter the interpreter. This routine is often
called when the widget record is in an inconsistent state,
only halfway cleaned up. If the command delete trace script
causes the widget to be accessed at this point (through
variable traces, event bindings, etc.), once again All Hell
Breaks Loose.
--Joe English
Thank you for not using automake.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Donald G Porter
Vince Darley
Joe English
Vince Darley
|