View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] full trace support for XOTcl methods/procs

From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Wed, 2 Jan 2008 21:42:56 +0200

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/