From: Vince D. <vin...@my...> - 2000-09-11 10:06:45
|
I had some spare time over the weekend, so I implemented 4 new options to 'trace add/remove command', in addition to the rename/delete options which are already in Tcl 8.4a2. These new options are: before, after, preinside and postinside (the names for the last 2 are horrible, I agree!). A patch is available at: ftp://ftp.ucsd.edu/pub/alpha/tcl/tracecmdexec.diff.gz Which should apply cleanly to the latest cvs pull. There is no documentation or tests for the new code. However all old tests pass, except for 6 in trace.test which fail because an error message has changed. Here is an example: administrator@TRAPPER //c/tclsource/tcl8.4cvs/win/Release $ tclsh84 % proc onexit {script} { trace add command exit before "$script ; #" } % onexit "puts hi" % exit hi administrator@TRAPPER //c/tclsource/tcl8.4cvs/win/Release $ The patch is reasonably complete: I've checked that stuff like deleting a trace or deleting a command while traces/commands are executing works ok. Comments appreciated, Vince. --== Sent via Deja.com http://www.deja.com/ ==-- Before you buy. -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |