[Xotcl] full trace support for XOTcl methods/procs

Kristoffer Lawson setok at fishpool.com
Wed Jan 2 20:42:56 CET 2008


On 2 Jan 2008, at 21:26, Eckhard Lehmann wrote:

> Kristoffer Lawson schrieb:
>>>
>>> I see that there is no need for another interception technique,  
>>> but it would be really helpful to have the current filter  
>>> techiques also applied to ordinary Tcl code inside methods.
>>
>> Why not just use the Tcl [trace] command for the normal Tcl commands?
> How would you do that, together with filters? enterstep/leavestep  
> work only in Tcl proc's, while filters work only on objects. How  
> could this be mixed - as methods are composed of calls to objects  
> (e.g. [my], [self])  as well as ordinary Tcl code?
> As long as it is separated, fine. But for Tcl statements in object  
> methods it seems more difficult to me.

You could just wrap it in a package that sets a Tcl [trace] for  
normal commands combined with filters for the XOTcl stuff, just  
checking to see if the command names match, if necessary. Or maybe  
I've missed something here and I'm thinking to simple :-)

            / http://www.scred.com/
            / http://www.fishpool.com/~setok/




More information about the Xotcl mailing list